Skip to content

Instantly share code, notes, and snippets.

@rsrini7
Created June 17, 2015 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsrini7/9b785089656bdf1f9d57 to your computer and use it in GitHub Desktop.
Save rsrini7/9b785089656bdf1f9d57 to your computer and use it in GitHub Desktop.
Installing db-sample-schema in windows (https://github.com/oracle/db-sample-schemas)
https://github.com/oracle/db-sample-schemas
download the zip file and extract to "D:\app\rsrini7\product\12.1.0\dbhome_1\demo\schema"
here rsrini7 is my username. extract the zip file to the dir according to your installation.
open command prompt as administrator
d: enter
cd D:\app\rsrini7\product\12.1.0\dbhome_1\demo\schema
mkdir log
perl -p -i.bak -e 's#__SUB__CWD__#'D:/app/rsrini7/product/12.1.0/dbhome_1/demo/schema/'#g' *.sql */*.sql */*.dat
(to install perl and other unix related tools - install babun - rocking tool for windows users. i love this )
edit mksample.sql and all '_main.sql' files and follow the below instructions
this is required : http://www.dba-oracle.com/t_ora_65096_create_user_12c_without_c_prefix.htm
1. in connect statement
add at the end 'as sysdba'
2. after the connect statement add the below line
alter session set "_oracle_script"=true;
type in the command prompt : sqlplus enter
connect oracle with sys as sysdba and enter
type the dba-password
At final execute the below script from sql prompt
@?/demo/schema/mksample <dba-password> <dba-password> password password password password password password EXAMPLE TEMP D:/app/rsrini7/product/12.1.0/dbhome_1/demo/schema/log/
replace <dba-password> with the actual dba password
happy learning:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment