Initial commit with BSL
This commit is contained in:
9
client/driver/oracleScripts/awrOracle.sh
Normal file
9
client/driver/oracleScripts/awrOracle.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
su - oracle <<EON
|
||||
oracle
|
||||
sqlplus / as sysdba <<EOF
|
||||
@/home/oracle/ottertune/client/driver/autoawr.sql;
|
||||
quit
|
||||
EOF
|
||||
exit
|
||||
EON
|
||||
23
client/driver/oracleScripts/restoreOracle.sh
Normal file
23
client/driver/oracleScripts/restoreOracle.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
su - oracle <<EON
|
||||
oracle #system password
|
||||
|
||||
sqlplus / as sysdba <<EOF
|
||||
drop user c##tpcc cascade;
|
||||
# username
|
||||
create user c##tpcc identified by oracle;
|
||||
# username password
|
||||
quit
|
||||
EOF
|
||||
|
||||
impdp 'userid="/ as sysdba"' schemas=c##tpcc dumpfile=orcldb.dump DIRECTORY=dpdata
|
||||
# username database_name db_directory
|
||||
|
||||
sqlplus / as sysdba <<EOF #restart the database
|
||||
shutdown immediate
|
||||
startup
|
||||
quit
|
||||
EOF
|
||||
|
||||
exit
|
||||
EON
|
||||
11
client/driver/oracleScripts/shutdownOracle.sh
Normal file
11
client/driver/oracleScripts/shutdownOracle.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
su - oracle <<EON
|
||||
oracle
|
||||
|
||||
sqlplus / as sysdba <<EOF
|
||||
shutdown immediate
|
||||
exit
|
||||
EOF
|
||||
|
||||
exit
|
||||
EON
|
||||
11
client/driver/oracleScripts/snapshotOracle.sh
Normal file
11
client/driver/oracleScripts/snapshotOracle.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
su - oracle <<EON
|
||||
oracle
|
||||
|
||||
sqlplus / as sysdba <<EOF
|
||||
exec dbms_workload_repository.create_snapshot;
|
||||
quit
|
||||
EOF
|
||||
|
||||
exit
|
||||
EON
|
||||
11
client/driver/oracleScripts/startupOracle.sh
Normal file
11
client/driver/oracleScripts/startupOracle.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
su - oracle <<EON
|
||||
oracle
|
||||
|
||||
sqlplus / as sysdba <<EOF
|
||||
startup
|
||||
quit
|
||||
EOF
|
||||
|
||||
exit
|
||||
EON
|
||||
Reference in New Issue
Block a user