Home » Infrastructure » Linux » accessing database as regular user (Oracle 11gR1,RHEL5.1)
accessing database as regular user [message #476559] Thu, 23 September 2010 23:35 Go to next message
PanamDimas
Messages: 63
Registered: April 2010
Location: Maryland . U.S.A
Member
Hello Senior members,

I have succesfully installed 11gR1 on Rhel5. It is working perfectly.
I was taught it is bad practice to log in as user oracle and work except fro trouble shooting.

How can I add a user to the OS and log in to access the database. To avoid logging in as oracle user?

Thank you
Sad Panam
Re: accessing database as regular user [message #476565 is a reply to message #476559] Fri, 24 September 2010 00:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
How can I add a user to the OS

Use "useradd"

Quote:
and log in to access the database.

Create a user (account, schema) in the database and log in with this account from the new user as it has told you in your previous topic.

You MUST read the basic about Oracle, you can't and will not be able to use it without them.
Goto to http://tahiti.oracle.com, click on your version number and read "2 Day DBA" and all books in "Getting Started" tab.

Regards
Michel
Re: accessing database as regular user [message #476676 is a reply to message #476565] Fri, 24 September 2010 08:30 Go to previous messageGo to next message
PanamDimas
Messages: 63
Registered: April 2010
Location: Maryland . U.S.A
Member
Michel,

Thanks for your swift response.

You would observe from my previous postings that I have used created a user and even log in to the system as the user.
My problem is accessing the database as a schema from that user.
This is what I have done so far:

I did this as root:

$ useradd -m -g dba user2
$ chown user2:dba /home/user2
$ passwd user2
NEW UNIX password:88888
Retype new UNIX password:88888
passwd:all authenticating tokens updated succesfully


Then I logged in as user2 and did the following:

$ export ORACLE_SID=user2db
$ echo ORACLE_SID
user2db
$ sqlplus sys as sysdba
bash:sqlplus:command not found
$ sqlplus / as sysdba
bash:sqlplus:command not found

Re: accessing database as regular user [message #476685 is a reply to message #476676] Fri, 24 September 2010 09:28 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
1/ Use SYSTEM to create an Oracle account
2/ Use this account to play with Oracle

Regards
Michel
Re: accessing database as regular user [message #477232 is a reply to message #476685] Wed, 29 September 2010 10:22 Go to previous message
mkounalis
Messages: 147
Registered: October 2009
Location: Dallas, TX
Senior Member
You need to alter the user2's default shell script to include setting the appropriate environment variables such as PATH, LD_LIBRARY_PATH, etc.
Previous Topic: can't connect as sys in added user
Next Topic: Oracle 10gR2 installation on RHEL5 through VMware
Goto Forum:
  


Current Time: Thu Dec 12 20:13:49 CST 2024