password file link

All posts relating to Oracle database administration.

Moderator: Tim...

password file link

Postby jnrpeardba » Wed Dec 18, 2013 4:43 pm

Hi Tim,

can you guide me in creating a password file link similar to the one mentioned below

in the directory --> /u01/sq/ora_1/db/11.2.0.3/dbs, I have a password file which looks like this:
Code: Select all
lrwxrwxrwx 1 oracle oinstall       38 Jul 11 14:58 orapwLKRESD -> /u02/oradata/LKRESD/LKRESD/orapwLKRESD

It also exsists in the directory mentioned
Code: Select all
ls -ltr /u02/oradata/LKRESD/LKRESD/orapwLKRESD

-rw-r----- 1 oracle oinstall 1536 Nov 28 09:17 /u02/oradata/LKRESD/LKRESD/orapwLKRESD


I am trying to make a similar link for another database called LEMHD to have identical link to the one mentioned above, been trying and can create the link but I do not see
a normal file in the directory --> /u02/oradata/LEMHD/LEMHD/ - what I see is another linked file

Can you help in passing the syntax to create the link to a password file

server:/u01/sq/ora_1/db/11.2.0.3/dbs # pwd
/u01/sq/ora_1/db/11.2.0.3/dbs ls -ltr
-rw-r----- 1 oracle oinstall 2048 Dec 18 16:18 orapwLEMHD


Many thanks Tim,

Jnrpeardba
jnrpeardba
Advisor
 
Posts: 392
Joined: Wed May 04, 2011 3:14 pm

Re: password file link

Postby Tim... » Wed Dec 18, 2013 5:10 pm

Hi.

You means "ln -s" right?

Code: Select all
ln -s /path/to/original/file.txt /path/to/link/file.txt


Without the "-s" it is a hard link. One file with two references. With the "-s" one is a symbolic link to the other. They both "feel" the same from a usage perspective, but one shows up as a link in an "ls -al".

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17935
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: password file link

Postby jnrpeardba » Thu Dec 19, 2013 9:02 am

Hi Tim,

I attempted your mentioned syntax and came up with this error

Code: Select all
ls -ltr /u01/sq/ora_1/db/11.2.0.3/dbs/orapwLEMHD
-rw-r----- 1 oracle oinstall 2048 Dec 18 16:18 /u01/sq/ora_1/db/11.2.0.3/dbs/orapwLEMHD
gbl04957_dummy /u01/sq/ora_1/db/11.2.0.3/dbs #


Code: Select all
ln -s $ORACLE_HOME/dbs/orapwLEMHD /u02/oradata/LMEHD/LEMHD/orapwLEMHD
ln: creating symbolic link `/u02/oradata/LMEHD/LEMHD/orapwLEMHD' to `/u01/sq/ora_1/db/11.2.0.3/dbs/orapwLEMHD': No such file or directory


Code: Select all
cd /u02/oradata/LEMHD/LEMHD/
gbl04957_dummy /u02/oradata/LEMHD/LEMHD # ls -ltr
total 1
drwxr-x--- 2 oracle oinstall   96 Dec  6 12:19 changetracking
drwxr-x--- 2 oracle oinstall 1024 Dec  9 10:08 datafile


is there something I am still missing?

Thanks

Jnrpeardba
jnrpeardba
Advisor
 
Posts: 392
Joined: Wed May 04, 2011 3:14 pm

Re: password file link

Postby jnrpeardba » Thu Dec 19, 2013 10:03 am

solved it now Tim,

I did the following:

Code: Select all
gbl04957_dummy /u01/sq/ora_1/db/11.2.0.3/dbs # mv $ORACLE_HOME/dbs/orapwLEMHD /u02/oradata/LEMHD/LEMHD/orapwLEMHD
gbl04957_dummy /u01/sq/ora_1/db/11.2.0.3/dbs # ln -s /u02/oradata/LEMHD/LEMHD/orapwLEMHD $ORACLE_HOME/dbs/orapwLEMHD


that left me with this

Code: Select all
gbl04957_dummy /u01/sq/ora_1/db/11.2.0.3/dbs # ls -ltr
total 19465
-rw-r--r-- 1 oracle oinstall     2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall       24 Jul  2 14:56 lkLKRESD
-rw-r--r-- 1 oracle oinstall       51 Jul 11 14:55 initLKRESD.ora
lrwxrwxrwx 1 oracle oinstall       38 Jul 11 14:58 orapwLKRESD -> /u02/oradata/LKRESD/LKRESD/orapwLKRESD
-rw-r----- 1 oracle oinstall       24 Dec  6 11:28 lkLNCBCD
-rw-r----- 1 oracle oinstall     1536 Dec  6 11:44 orapwLNCBCD
-rw-rw---- 1 oracle oinstall     1544 Dec 18 22:00 hc_LEMHD.dat
-rw-r----- 1 oracle oinstall 19906560 Dec 19 02:05 snapcf_LKRESD.f
lrwxrwxrwx 1 oracle oinstall       35 Dec 19 09:57 orapwLEMHD -> /u02/oradata/LEMHD/LEMHD/orapwLEMHD


and when I did an ls -ltr it was as I expecected it to be

Code: Select all
ls -ltr /u02/oradata/LEMHD/LEMHD/orapwLEMHD
-rw-r----- 1 oracle oinstall 2048 Dec 18 16:18 /u02/oradata/LEMHD/LEMHD/orapwLEMHD
gbl04957_dummy /u01/sq/ora_1/db/11.2.0.3/dbs #


Thanks for your input, again and always much appreciated,

Jnrpeardba
jnrpeardba
Advisor
 
Posts: 392
Joined: Wed May 04, 2011 3:14 pm

Re: password file link

Postby Tim... » Thu Dec 19, 2013 11:59 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17935
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron