Thrash Database
Introduction:
Now that we know that we can connect to the database(s) let's thrash the hell out of them. If successful, we achieve two things; we prove a hell of a lot about whether they are viable (this test touches on a LOT of basic Oracle operation), and we tell it who's boss. Databases need to know this stuff. They are a bit like kids really - they need a good thrashing every now and again.
Apologies for the 'width' of this post. There is a very long string in the code below and it really needs to be there.
Aim:
Give us a warm, fuzzy feeling about our database(s).
Requirements:
At least one database is installed and running.
Procedure:
This test should be run for each installed database:
- Log on as oracle.
- Open Terminal.
- Run the following script:
- Best. Download this.
- Or. Copy this to a file (probably called test.sql):
-- creating a table |
- Connect to a database as system:
- $ sqlplus system/*******@[dbs] (where ********* is the system user password, and [dbs] is the SID of the database.
- Run the test script:
- SQL> @test
- This will report a load of stuff but there should be no errors apart from; 'ERROR at line 1: ORA-00942: table or view does not exist' (this just makes sure the table the script is creating is not already there). It also takes a while - we're thrashing it, right!
- Finally, the script reports today's date. It should be of the format: 'DD-MON-YY'.
- Exit SQL*PLUS:
- SQL> exit
0 Comments:
Post a Comment
<< Home