Showing posts with label remote. Show all posts
Showing posts with label remote. Show all posts

Thursday, March 19, 2009

Connect to Oracle as sys via toad or any other third party software

A remote connect as a privileged user requires the database to be configured to allow remote DBA operations. The remote user will HAVE to supply a password in order to connect AS SYSDBA.

Ie: In Oracle to perform a remote connect AS SYSDBA you must use the syntax

'CONNECT
SYS/PASSWORD@ORACLE_SID AS SYSDBA'

To allow remote SYSDBA connections you must:
- Set up a password file for the database on the server
- Set up any relevant init.ora parameters

-- Setting up a Password File:
The password protection is controlled by an Oracle 'Password' file. To create a password file log in as the Oracle software owner and issue the command:

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=mypasswd

using the required password. The file name is important and should specified as above. You should create this file when the database is shut down.

To change a password:
- shut down the database,
- Rename the $ORACLE_HOME/dbs/orapw$ORACLE_SID file
- Issue a new orapwd command with a new password

Alternatively, when the database is open use:

ALTER USER SYS IDENTIFIED BY &NEWPASSWORD;

This will propagate the (hashed) password to the existing password file.

-- Setting up the Init.Ora file To enable remote SYSDBA connections set the init.ora parameters thus:

Set REMOTE_LOGIN_PASSWORDFILE to either EXCLUSIVE or SHARED.
EXCLUSIVE forces the password file to be tied exclusively to a single instance. To disable remote internal connections set REMOTE_LOGIN_PASSWORDFILE to NONE.


NOTE: The setting of REMOTE_OS_AUTHENT does NOT affect the ability to connect AS SYSDBA from a remote machine.


Wednesday, January 7, 2009

Downloading, Installing and running Remote Diagnostic Agent (RDA)

RDA can be downloaded as a bundle with Oracle Configuration manager or as a stand alone package from metalink at note id 314422.1.

- Download the zip/tar files from the note and change the name to 'rda.zip' or 'rda.tar' depending on what format you download.

- Choose or create a directory that is owned by the OS user who is also the owner of the Oracle installation.

- Copy the rda zip/tar file to the above directory and extract its contents there using one of the following commands depending on the format of the RDA download.

tar xvf rda.tar (or)
gunzip rda.tar.gz (or)
tar xvf rda.tar (or)
unzip rda.zip

- Make sure the rda.sh and rda.pl scripts have execute permissions. If they lack it, issue the following command

chmod +x rda.sh
chmod +x rda.pl

- Test if the rda scripts can be executed

for unix/linux - sh rda.sh -cv
for windows - rda.cmd -cv

these commands should not return any issues

- To run RDA, log in as the user who owns the Oracle installation and execute the following script

for Linux/Unix machines

rda.sh - Use this command if Perl is not available.

rda.pl - Use this command if Perl is available.

For windows,

rda.cmd Use this command if Perl is not available.

rda.pl Use this command if Perl is available in the path.


- To check availability of PERL, use the following command.

perl -v