In this post I’m going to show you how to test simple PL/SQL queries on an Oracle 10g database. Because this year I focus on databases I’ve decided to attend ‚Database Management Systems‘ which is a lecutre at my university.
This lecture or better the responsible institute provides an Oracle 10g database for all students who’d like to complete the corresponding exercise. Here is the description of the first exercise. I had to design a (small) complete database including EER-Diagram, relations, CREATE TABLE, DROP TABLE and INSERT INTO statements.
So, if you already have designed the EER-Diagram and corresponding database-relations you have to implement the necessary sql-files and execute them on the server which is provided by the lecture’s institute. I focus on showing you how to test under Windows Vista.
The first step I had to do I had to download a ssh-client for my OS to connect to the universities‘ server. I chose Putty because I’m a experienced on using this client. After I’ve successfully installed Putty I tried to connect to the server by opening a new session.
I’ve entered my creds and finally I successfully was connected.
Then I’ve create a test directory where I wrote my first create_table.sql file with vim.
In the next step I’ve started a new Putty-Connection to run the table script by entering ‚slqp‚ on the command-line. Again I had to enter my creds for this SQLPlus session.
The first command which you should enter is the ‚SET SERVEROUTPUT ON‚ command to get the corresponding output of the server after you have executed a query.
Then I’ve testet my create_table.sql file by typing ‚start PATH_TO_FILE/create_table.sql‘. If your sql-file successfully executed you can type ‚exit‚ to exit the SQLPlus session.
To be continued …
Dieser Beitrag wurde unter Oracle 10g
veröffentlicht. Setze ein Lesezeichen auf den Permalink