Oracle Admin

From sheep
Revision as of 21:37, 14 September 2021 by Martin (talk | contribs) (Created page with "= auto login = export ORACLE_SID=sid sqlplus user/password@tnsName = add permissions to user to connect = grant resource,connect to user; - full permissions = output to f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

auto login

export ORACLE_SID=sid

sqlplus user/password@tnsName

add permissions to user to connect

grant resource,connect to user; - full permissions


output to file

spool <filename> spool off


killing session

select * from U$session where username="user";

alter system kill session "sid,serial#";

Dump database

exp  user/password@sid FULL=y  FILE=file.dmp
imp user/password FIlE=file.dmp [FROMUSER=user]

show constraints

http://en.wikibooks.org/wiki/Oracle_Programming/SQL_Cheatsheet#Displaying_Constraints

SELECT
	table_name,
	constraint_name,
	constraint_type
FROM user_constraints;