Thursday, 17 September 2015

How to activate scott schema in Oracle Express Edition


SCOTT is a database username in ORACLE  database software.
In Scott Schema we have some default tables like emp, dept, salgrade, bonus..
these tables are so well designed that every functionalities supported by Oracle works on these tables. so for the SQL practitioner  these tables are really helpful . But now this scott schema is not available in the current versions of oracle( oracle 9i onwards) in newer version we have hr and other schemas  for practice . but for the old practitioner  we feel easy while practicing on these default tables .
so if you want to enable the scott schema in your version of Oracle you can follow the below simple steps

step1) login to oracle as the System DBA
    sql> conn system/manager ;
then search the file SCOTT.sql in your oracle installation directory then copy the path of the SCOTT.sql and enter into the sql prompt
SQL> @%ORACLE_HOME%\RDBMS\ADMIN\SCOTT.sql;
 (in my system "@C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\scott.sql"
so i will do like
SQL>@C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\scott.sql )
SQL> connect scott/tiger
Connected.

easy final steps
 sql> conn system/manager ;
connected.
SQL>@C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\scott.sql )
SQL> connect scott/tiger
Connected.

so now you can use the SCOTT schema and can have the default tables of SCOTT schema.



hope this tutorial is helpful to you
thanks




0 comments:

Post a Comment