Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname ASCII -sid ASCII -responseFile NO_VALUE -storageType ASM -diskGroupName DATA -characterSet US7ASCII -memoryPercentage 20 -emConfiguration LOCAL -sampleSchema FALSE
- [oracle@waipio1 ASCII]$ cat ASCII.LOG
- UNIQUE DATABASE identifier CHECK passed.
- +DATA has enough SPACE. Required SPACE IS 6470 MB , available SPACE IS 23011 MB.
- FILE Validations SUCCESSFUL.
- Copying DATABASE files
- DBCA_PROGRESS : 1%
- DBCA_PROGRESS : 3%
- etc.
- DBCA_PROGRESS : 96%
- DBCA_PROGRESS : 100%
- DATABASE creation complete. FOR details CHECK the logfiles AT:
- /app/oracle/cfgtoollogs/dbca/ASCII.
- DATABASE Information:
- Global DATABASE Name:ASCII
- SYSTEM Identifier(SID):ASCII
- The script:
- #!/bin/ksh
- export NLS_LANG=.WE8MSWIN1252
- sqlplus -s win/win <<-EOF
- SET linesize 200
- SET trimspool ON
- SET pagesize 0
- SET feedback off
- spool quantumext.dat
- SELECT q'{Bose}' || UNISTR('\2013') || q'{Einstein}' val FROM dual;
- spool off
- quit
- EOF
- unset NLS_LANG
- sqlplus win/win <<-EOF
- CREATE DIRECTORY quant AS '/home/oracle/sql/characterset';
- CREATE TABLE quantumext (
- stattype VARCHAR2 ( 13 CHAR )
- )
- ORGANIZATION external
- (TYPE oracle_loader
- DEFAULT DIRECTORY quant
- ACCESS parameters
- (
- records delimited BY newline
- badfile 'quantumext.bad'
- discardfile 'quantumext.dis'
- logfile 'quantumext.log'
- fields terminated BY "," optionally enclosed BY '"'
- (
- stattype CHAR(25)
- )
- )
- location ('quantumext.dat')
- )
- ;
- CREATE TABLE quantumstats (
- stattype VARCHAR2 ( 13 CHAR )
- );
- INSERT INTO quantumstats SELECT stattype FROM quantumext;
- COMMIT;
- SELECT DUMP( stattype ) FROM quantumstats;
- -- drop table quantumstats;
- DROP TABLE quantumext;
- DROP DIRECTORY quant;
- EOF
- [oracle@waipio1 ASCII characterset]$ ./INSERT.win.chars.ksh
- BoseEinstein
- SQL*Plus: RELEASE 12.1.0.1.0 Production ON Sat Feb 1 21:45:41 2014
- Copyright (c) 1982, 2013, Oracle. ALL rights reserved.
- LAST SUCCESSFUL login TIME: Sat Feb 01 2014 21:45:41 -05:00
- Connected TO:
- Oracle DATABASE 12c Enterprise Edition RELEASE 12.1.0.1.0 - 64bit Production
- WITH the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
- AND REAL Application Testing options
- SQL> SQL>
- DIRECTORY created.
- SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
- TABLE created.
- SQL> SQL> 2 3
- TABLE created.
- SQL>
- 1 ROW created.
- SQL> SQL>
- COMMIT complete.
- SQL>
- DUMP(STATTYPE)
- --------------------------------------------------------------------------------
- Typ=1 Len=13: 66,111,115,101,150,69,105,110,115,116,101,105,110
- SQL> SQL> SQL>
- TABLE dropped.
- SQL>
- DIRECTORY dropped.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement