Monday, November 02, 2015

install oracle sample data

Famous scott/tiger is here.

ORCL2:/u01/app/oracle/product/11.2.0.4/rdbms/admin> ls utlsampl.sql
utlsampl.sql


SQL> conn scott/tiger
Connected.
SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE


Install the sample schema installer files.
demo schemas are under $ORACLE_HOME/demo/schema directory.


DG:/u01/app/oracle/product/11.2.0.4/demo/schema/order_entry> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 19 15:11:28 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> @oe_main

specify password for OE as parameter 1:
Enter value for 1: oe

specify default tablespeace for OE as parameter 2:
Enter value for 2: USERS

specify temporary tablespace for OE as parameter 3:
Enter value for 3: temp

specify password for HR as parameter 4:
Enter value for 4: hr

specify password for SYS as parameter 5:
Enter value for 5: ****

specify directory path for the data files as parameter 6:
Enter value for 6: /u01/app/oracle/product/11.2.0.4/demo/schema/order_entry

writeable directory path for the log files as parameter 7:
Enter value for 7: /u01/app/oracle/product/11.2.0.4/demo/schema/order_entry

specify version as parameter 8:
Enter value for 8: v3


User dropped.

old   1: CREATE USER oe IDENTIFIED BY &pass
new   1: CREATE USER oe IDENTIFIED BY oe

User created.

old   1: ALTER USER oe DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs
new   1: ALTER USER oe DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS

User altered.

old   1: ALTER USER oe TEMPORARY TABLESPACE &ttbs
new   1: ALTER USER oe TEMPORARY TABLESPACE temp

User altered.