Home » RDBMS Server » Server Administration » How to create an object in user schema with out actually logging into the user
How to create an object in user schema with out actually logging into the user [message #181952] Wed, 12 July 2006 05:59 Go to next message
oranil
Messages: 5
Registered: July 2006
Location: Singapore
Junior Member

How to create an object under the schema user with actually logging [ coz u r not given the password, but u r "SYS'] and not using "user.object_name" way of programming.
Re: How to create an object in user schema with out actually logging into the user [message #181955 is a reply to message #181952] Wed, 12 July 2006 06:09 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

Just a workaround Wink

SQL> show user
USER is "SYS"
SQL> select username,password from dba_users
  2  where username='SCOTT';

USERNAME                       PASSWORD
------------------------------ ------------------------------
SCOTT                          F894844C34402B67

SQL> alter user scott identified by yourpassword;

User altered.

SQL> conn scott/yourpassword
Connected.
SQL> show user
USER is "SCOTT"
SQL> create table newtab(n1 number,n2 varchar2(20));

Table created.

SQL> conn sys as sysdba
Enter password: *****
Connected.
SQL> alter user scott identified by values 'F894844C34402B67';

User altered.

Re: How to create an object in user schema with out actually logging into the user [message #181957 is a reply to message #181955] Wed, 12 July 2006 06:15 Go to previous messageGo to next message
oranil
Messages: 5
Registered: July 2006
Location: Singapore
Junior Member

Hi Tarunda,
Thanks for ur effort. But in a PRODUCTION database, u r not allowed to change the APPLICATION user pwd [ if u do, the end user cannot connect to DB, hence ur job is gone]. So the case is no manipulation of USER password n u r not given the user password.

Hope u got me.

Cheers,
Anil
Re: How to create an object in user schema with out actually logging into the user [message #181959 is a reply to message #181952] Wed, 12 July 2006 06:24 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You may want to consider:

SQL> alter session set current_schema = <other_schema_name>;

Then create the necessary objects.
Previous Topic: A newby schema/user/table/tablespace question
Next Topic: Check number of user in tablespace
Goto Forum:
  


Current Time: Fri Sep 20 10:22:56 CDT 2024