Message no. 1214[Branch from no. 1207]
Posted by Christopher Newman (cjnewman) on Monday, September 10, 2007 9:32pm
Subject: Re: User Authentication

Hi Chandra,

Wow, you wrote a lot!  I question one thing in your post, and this is
going to be useful for the entire class.

You wrote to connect via OS you type : SQLPLUS /

I'm not sure that actually works.  What I normally do, and I even do
this on our production boxes, is I 'su' to the oracle user, then type:

sqlplus "/ as sysdba"

This authenticates me through the OS and connects me to whichever
database SID I've set in my current environment.

To make this even easier, you can write an alias, so say you just want
to type 's' and it performs the above for you.

Your alias in tcsh would look like this:

s       sqlplus "/as sysdba"

If you want to connect remotely as SYS, ensure that you have the init
parameter remote_login_passwordfile set to 'EXCLUSIVE'.

Then create a password file, making sure that you enter the correct
password for SYS into the file (Don't worry, it won't be stored in human
readable form).

Create the password file as such:

orapwd file=/location/ofyourfile/orapw<SID>.ora entries=1 password=YOURPASS

That's it, now you can connect remotely as sys.

One final tip, if you have multiple databases on a single machine, you
may want to create an admin directory, then create symlinks from
$ORACLE_HOME/dbs to your admin directories for orapw<SID>.ora
init<SID>.ora and spfile<SID>.ora

Let me know if any of this is useful, if not I'll just keep quiet.


Enjoy - Chris


Subject: Any problems + hint 
Message no. 1213 Author: Christopher Newman (cjnewman) Date: Monday, September 10, 2007 9:24pm 
Hello,

Is anyone having any issues with project 3?  You may not run into this
with this project, but the following is good to know.

You can create oracle passwords using *any* characters you want!  The
only thing you have to do is ensure you enclose the password in
quotation marks as such:

alter user scott identified by "1!+bala^";

So here's the real output:

1) SQL> alter user scott identified by 1+bala^;
alter user scott identified by 1+bala^
                               *
ERROR at line 1:
ORA-00988: missing or invalid password(s)

No quotes, we fail.

2) SQL> alter user scott identified by "1+bala^";

User altered.

Walaaaa.  Just make sure that when you are attempting to log in, that
you also use quotation makes.  Passwords beginning with #'s will also
fail unless you use quotation marks.

Enjoy - Chris