Monday 29 September 2008

OEM Agent - Cleaning out

On the Repos Server

SELECT target_name
FROM sysman.MGMT_TARGETS
where 1=1
and target_type = 'oracle_emd'
and target_name like '%mis%'
order by 1

commit

execute sysman.mgmt_admin.cleanup_agent('target_name:port>');

If this hangs then kill it and run ...

update sysman.MGMT_TARGETS_DELETE set delete_complete_time = sysdate
where target_name like '%slofosdb01.odl.com:3872%'

On the Agent Machine
  • rm - rf $OracleHome/sysman/emd/upload
  • rm -rf $OracleHome/sysman/emd/recv
  • rm -rf $OracleHome/sysman/emd/state
  • Resecure the connection - emctl secure agent
  • Restart the agent - emctl start agent
  • Upload info - emctl upload

Tuesday 23 September 2008

Speaking Imap (in telnet)

http://support.microsoft.com/kb/189326

Telnet IP address of Mail server (Exchange) 143

LOGIN NTDOMAIN/NTACCOUNT/ALIAS PASSWORD

? LIST "" "*"

? Select Folder (where Folder is the mailbox folder that you want, such as Inbox or Deleted Items)

? FETCH message number> All (where message number is 1, 2, 3, and so on)
? FETCH message number Body (where message number is 1, 2, 3, and so on)

? LOGOUT

MS Server 2003 : Getting an RDP session

To use the command line hacks, you might need to run them from another server if your local operating system doesn't include the commands. You will also need to make sure that you are logged onto that server with an administrative account. The easiest way to do that is just map a drive (you don't have to use a drive letter unless you choose to)

net use /user:[username] \\servername\share

Here's a command line hack that you can use to figure out what
sessions are connected to the server. Note that you could substitute
the IP address for the server name.

query session /server:servername

Now we know that the session ID of the offending session is 2. We can
use that in the next step, which is using the reset command to log off
that user.

reset session [ID] /server:servername

Friday 19 September 2008

NTLM in Firefox

  • Go to your Firefox address bar and type about:config.
  • Look for the key called network.automatic-ntlm-auth.trusted-uris.
  • Set that key’s value to a comma separated list of servers you want NTLM auth for.
  • Name of each server must be exactly the same as in the URL used
  • Seem to need to restart Firefox for it to take effect



Wednesday 17 September 2008

Adding an 11G RAC service

  • . oraenv NDEV1C
  • srvctl add service -d NDEV1C-s "OTIIDEV" -r "NDEV1C1,NDEV1C2" -P BASIC
  • srvctl status service -d NDEV1C-s "OTIIDEV"
  • srvctl start service -d NDEV1C-s "OTIIDEV"
  • srvctl stop service -d NDEV1C-s "OTIIDEV"
  • srvctl remove service -d NDEV1C-s "OTIIDEV"
  • srvctl remove service -d NDEV1C-s "OTIIDEV" -r "NDEV1C1,NDEV1C2"
alter system set  service_names='NDEV1C.ODLS.COM,OTIIDEV.ODLS.COM' scope=both

alter system register

Tuesday 16 September 2008

Grep for rows after and before a pattern

Gnu gre.

grep -A 2 ORA-01555 bdump/alert_LIVE1.log | grep -B2 SYS.EXU9R

-A = After
-B = Before

Friday 5 September 2008

SmartCVS - ignoring files in foundation edition

Create the file .cvsignore in your home directory with exclusion pattern per line
F
or windows this is %USERPROFILE% and you need to rename the file to .cvsignore at the command prompt as explorer does not like files with only suffixes