Oracle Admin: Difference between revisions

From sheep
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 21:37, 14 September 2021

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;