0% found this document useful (0 votes)
38 views3 pages

Doubt

The document discusses various SQL questions about managing users, sessions, and permissions in an Oracle database. It includes questions about changing passwords, granting permissions to tables, closing sessions, transferring tables between users, and assigning users to specific datafiles and tablespaces.

Uploaded by

srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Doubt

The document discusses various SQL questions about managing users, sessions, and permissions in an Oracle database. It includes questions about changing passwords, granting permissions to tables, closing sessions, transferring tables between users, and assigning users to specific datafiles and tablespaces.

Uploaded by

srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

what is the benifit for change password of user at /as sysdba

how can only grant to create table, & not to permit delete, alter, insert to tha
t table
how can we close multiple sessions
it connot possible table of an user is to send that table to another user?
SQL> conn tom/tm
Connected.
SQL> select * from tab;
TNAME
-----------------------------EMP
EMP2
HERO
MANAGERS
SALARY

TABTYPE CLUSTERID
------- ---------TABLE
TABLE
TABLE
TABLE
TABLE

SQL> grant select on tom.emp2 to parker;


Grant succeeded.
SQL> conn parker/parker
Connected.
SQL> select * from tab;
TNAME
TABTYPE CLUSTERID
------------------------------ ------- ---------MATERIALS
TABLE
SQL> insert into emp2.tom select * from materials;
insert into emp2.tom select * from materials
*
ERROR at line 1:
ORA-00942: table or view does not exist
how can you active the session. and to connect the assingned user
SQL> /
USERNAME
-----------------------------PA1
PA1
PA1
PA1

STATUS
-------INACTIVE
INACTIVE
INACTIVE
INACTIVE

SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
USERNAME
DEFAULT_TABLESPACE
TEMPORARY_TABLESPA
CE
------------------------------ ------------------------------ ------------------

-----------OUTLN
SYS
SYSTEM
TOM
DIP
ORACLE_OCM
APPQOSSYS
DBSNMP

SYSTEM
SYSTEM
SYSTEM
JOHN1
SYSTEM
SYSTEM
SYSAUX
SYSAUX

SYSTEM
SYSTEM
SYSTEM
SYSTEM
SYSTEM
SYSTEM
SYSTEM
SYSTEM

SQL> select USERNAME, ACCOUNT_STATUS, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE,


PROFILE from dba_users;
USERNAME
ACCOUNT_STATUS
DEFAULT_TABLESPA
CE
TEMPORARY_TABLESPACE
PROFILE
------------------------------ -------------------------------- ----------------------------- ------------------------------ -----------------------------JERRY
OPEN
SRI02
TEMPX
DEFAULT
TOM
OPEN
SRI01
TEMPX
DEFAULT
APPQOSSYS
EXPIRED & LOCKED
SYSAUX
TEMPX
DEFAULT
DBSNMP
EXPIRED & LOCKED
SYSAUX
TEMPX
DEFAULT
OUTLN
OPEN
SYSTEM
TEMPX
DEFAULT
SYS
OPEN
SYSTEM
TEMPX
DEFAULT
SYSTEM
OPEN
SYSTEM
TEMPX
DEFAULT
DIP
EXPIRED & LOCKED
SYSTEM
TEMPX
DEFAULT
ORACLE_OCM
EXPIRED & LOCKED
SYSTEM
TEMPX
DEFAULT
how can we alot a new user to particular datafile in tablespace
SQL> conn /as sysdba
Connected.
SQL> grant create table to tom;
Grant succeeded.
SQL> conn tom/tom
Connected.
SQL> create table managers as select * from tab;
create table managers as select * from tab
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SRI01'

SELECT SID,SERIAL#,STATUS,SERVER
FROM V$SESSION
WHERE USERNAME = 'JWARD';
SID
SERIAL#
----- -------7
15
12
63
2 rows selected.

STATUS
--------INACTIVE
INACTIVE

SERVER
--------DEDICATED
DEDICATED

ALTER SYSTEM KILL SESSION '7,15';


Statement processed.
SELECT SID, SERIAL#, STATUS, SERVER
FROM V$SESSION
WHERE USERNAME = 'JWARD';
SID
SERIAL#
----- -------7
15
12
63
2 rows selected.

STATUS
--------KILLED
INACTIVE

SERVER
--------PSEUDO
DEDICATED

You might also like