Bookmark and Share
Oracle DBA 常用脚本(1) : start and shutdown Oracle database
(Publish Date: 2007-3-27 6:31pm, Total Visits: 14737, Today: 1, This Week: 5, This Month: 6)

start, shutdown and abort the Oracle database

##########start the database: dbstart.sh##########
#!/bin/ksh
sqlplus /nolog << oxff
connect cherry/cherry as sysdba
startup pfile=/rdbms/oracle/ora1022i/64/dbs/initOra1022a_cherry.ora
exit
0xff

##########shutdown the database: dbstop.sh##########
#!/bin/ksh
sqlplus /nolog << oxff
connect cherry/cherry as sysdba
shutdown immediate
exit
0xff

##########abort the database: dbabort.sh##########
#!/bin/ksh
sqlplus /nolog << oxff
connect cherry/cherry as sysdba
shutdown abort
exit
0xff

Running a sql script/truncate table

##########running sql scripts: dbinsert.sh##########
#!/bin/ksh
sqlplus /nolog << oxff
connect cherry/cherry
@insert_table.sql
exit
0xff

##########truncate table: dbtruncate.sh##########
#!/bin/ksh
sqlplus /nolog << oxff
connect cherry/cherry
truncate table test;
exit
0xff


[Total Users: 4]

I want to comment on it

Display: 1 - 0 of 4, Total Pages: 0