Oracle Tool+DB

1-Shudown +Startup mount
2-Restart Oracle Database
3-Start isqlplus server
4-set linesize 1000 in (sqlplus)
5-show current log in user in sqlplus
6-start and stop Oracle Enterprise Manager Service
7-Run Script in Linux and window
8-Format Column in sqlplus
9-show oracle version
10-spool spool off;
11-create relationship diagram in oracle


1-Shudown +Startup mount
startup mount force
2-Restart Oracle Database
startup force
3-Start isqlplus server
isqlplusctl start
4-set linesize 1000 in (sqlplus)
Set line size in oracle in order to easy view text
 5-show current log in user in sqlplus
sql> show user;

Show current user

6-start and stop Oracle Enterprise Manager Service
emctl stop dbconsole
emctl start dbconsole

7-Run Script in Linux and window
./Batch_sql.sh  --> Run Script in Linux

in Batch_sql :
#Name of this file batch_sql
sqlplus hr/hr <<EOF
select count(*) from employees;
update..;
commit;
quit
EOF

sql> @ 'c:/sql.sql'   --> run script in window

C:\>sqlplus hr/123456 @sql.sql

8-Format Column in sqlplus


sql>column column_name format a30
sql>column value format a30
sql>set linesize 300
sql>set pagesize 14|N
change property in command promt also

9-show oracle version

SELECT VALUE
  FROM v$system_parameter
 WHERE name = 'compatible';
10-spool spool off;
copy your result  of running sqlplus into a file
spool /A/x.log;
call proced_name;
spool off;
exit;
11-create relationship diagram in oracle
sql developer --> view --> data Modeler --> Browser --> relationship Model



No comments:

Post a Comment