Home » SQL & PL/SQL » Client Tools » running sql plus worksheet as test user
running sql plus worksheet as test user [message #148887] Mon, 28 November 2005 19:59 Go to next message
clyded
Messages: 2
Registered: November 2005
Junior Member
hello,

i want to create a bunch of tables using a test user that has dba privileges. i want the tables to be in the test schema

when im in the worksheet, i connect ok

if i use the "sysdba" with my test user, the table is create in the sys schema

if i connect "normal" i get an invalid login/password error and it disconnects me.

i have found that if i change the create table to test.table1 it works

the problem that i have is the number of tables, there are like 100+ tables in the sql script. i would have to change that in every table name!

any suggestions?

thanks
Re: running sql plus worksheet as test user [message #148971 is a reply to message #148887] Tue, 29 November 2005 05:50 Go to previous message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
do not log in as sysdba. When you log in as sysdba, you are always logged in as sys (log in under that user and type sho user - it will display sys). Therefore any tables created will belong to sys (unless you prefix them with another schema)
Quote:

i want to create a bunch of tables using a test user that has dba privileges

Then why create a user with sysdba privs?
Are you absolutely sure that the user needs dba privs to do the job required? If you are positive the grant dba privs NOT sysdba privs.
You can use alter session set current_schema =
to change where objects will be created by default. Do not do this for the sys user (or the user you have created with sys privs - which is the same thing)

HTH
Jim

Previous Topic: iSQL*plus of Oracle 10g
Next Topic: TOAD - SDO_GEOMETRY
Goto Forum:
  


Current Time: Tue Aug 11 07:11:29 CDT 2020