Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/cidamon.com/html/blog/textpattern/lib/txplib_db.php on line 14
Cidamon: Blog: Simple use of sqlplus
Simple use of sqlplus
14 September, 2010

Bellow are the steps required to execute a sql script using sqlplus

Start listener
$ lsnrctl start

Login to sqlplus
$ sqlplus username/password (if using sys then “sys/password as sysdba”)

Start the database
sql>startup

Turn on spool
sql>Spool on

Set output file
sql>Spool /home/oracle/log1

Execute sql script
sql>@/home/oracle/myquery.sql

Turn spool off
sql>Spool off

Shutdown database
sql>shutdown immediate

Exit sqlplus
sql>exit

Stop listener
$ lsnrctl stop

---

Commenting is closed for this article.