[oraclei@localhost scripts]$ sh testdb.sh /db/u01/app/oracle/product/10.2.0/db/install/oratab: testdb:/db/u01/app/oracle/product/10.2.0/db:Yにこのエントリを追加してください SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 25 11:05:42 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. specify a password for sys as parameter 1 Enter value for 1: oracle specify a password for system as parameter 2 Enter value for 2: oracle specify a password for sysman as parameter 3 Enter value for 3: oracle specify a password for dbsnmp as parameter 4 Enter value for 4: oracle Connected to an idle instance. SQL> spool /db/u01/app/oracle/admin/testdb/scripts/CloneRmanRestore.log SQL> startup nomount pfile="/db/u01/app/oracle/admin/testdb/scripts/init.ora"; ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes SQL> @/db/u01/app/oracle/admin/testdb/scripts/rmanRestoreDatafiles.sql; SQL> set echo off; TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:07:13 Allocating device.... Specifying datafiles... Specifing datafiles... Restoring ... Restore done. PL/SQL procedure successfully completed. TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:07:44 Connected. SQL> spool /db/u01/app/oracle/admin/testdb/scripts/cloneDBCreation.log SQL> Create controlfile reuse set database "testdb" 2 MAXINSTANCES 8 3 MAXLOGHISTORY 1 4 MAXLOGFILES 16 5 MAXLOGMEMBERS 3 6 MAXDATAFILES 100 7 Datafile 8 '/db/ora/testdb/system01.dbf', 9 '/db/ora/testdb/undotbs01.dbf', 10 '/db/ora/testdb/sysaux01.dbf', 11 '/db/ora/testdb/users01.dbf' 12 LOGFILE GROUP 1 ('/db/ora/testdb/redo01.log') SIZE 51200K, 13 GROUP 2 ('/db/ora/testdb/redo02.log') SIZE 51200K, 14 GROUP 3 ('/db/ora/testdb/redo03.log') SIZE 51200K RESETLOGS; Control file created. SQL> exec dbms_backup_restore.zerodbid(0); PL/SQL procedure successfully completed. SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup nomount pfile="/db/u01/app/oracle/admin/testdb/scripts/inittestdbTemp.ora"; ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes SQL> Create controlfile reuse set database "testdb" 2 MAXINSTANCES 8 3 MAXLOGHISTORY 1 4 MAXLOGFILES 16 5 MAXLOGMEMBERS 3 6 MAXDATAFILES 100 7 Datafile 8 '/db/ora/testdb/system01.dbf', 9 '/db/ora/testdb/undotbs01.dbf', 10 '/db/ora/testdb/sysaux01.dbf', 11 '/db/ora/testdb/users01.dbf' 12 LOGFILE GROUP 1 ('/db/ora/testdb/redo01.log') SIZE 51200K, 13 GROUP 2 ('/db/ora/testdb/redo02.log') SIZE 51200K, 14 GROUP 3 ('/db/ora/testdb/redo03.log') SIZE 51200K RESETLOGS; Control file created. SQL> alter system enable restricted session; System altered. SQL> alter database "testdb" open resetlogs; Database altered. SQL> alter database rename global_name to "testdb"; Database altered. SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/db/ora/testdb/temp01.dbf' SIZE 20480K REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED; Tablespace altered. SQL> select tablespace_name from dba_tablespaces where tablespace_name='USERS'; TABLESPACE_NAME -------------------------------------------------------------------------------- USERS SQL> alter system disable restricted session; System altered. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> @/db/u01/app/oracle/product/10.2.0/db/demo/schema/mkplug.sql &&sysPassword change_on_install change_on_install change_on_install change_on_install change_on_install change_on_install /db/u01/app/oracle/product/10.2.0/db/assistants/dbca/templates/example.dmp /db/u01/app/oracle/product/10.2.0/db/assistants/dbca/templates/example01.dfb /db/ora/testdb/example01.dbf /db/u01/app/oracle/admin/testdb/scripts/ "\'SYS/&&sysPassword as SYSDBA\'"; SQL> Rem SQL> Rem $Header: mkplug.sql 02-may-2005.16:30:30 cbauwens Exp $ SQL> Rem SQL> Rem mkplug.sql SQL> Rem SQL> Rem Copyright (c) 2001, 2005, Oracle. All rights reserved. SQL> Rem SQL> Rem NAME SQL> Rem mkplug.sql - plug in transportable tablespace EXAMPLE SQL> Rem SQL> Rem DESCRIPTION SQL> Rem tbd SQL> Rem SQL> Rem NOTES SQL> Rem The EXAMPLE tablespace only contains the Sample Schemas SQL> Rem - CAUTION: Never use the Sample Schemas for SQL> Rem anything other than demos and examples SQL> Rem - USAGE: tbd SQL> Rem - LOG FILES: The log files are written SQL> Rem to the equivalent of $ORACLE_HOME/demo/schema/log SQL> Rem If you edit the log file location further down in this SQL> Rem script, use absolute pathnames SQL> Rem SQL> Rem MODIFIED (MM/DD/YY) SQL> Rem cbauwens 05/02/05 - bug4054905 Date & Time format SQL> Rem cbauwens 04/19/05 - fix privs for SH and BI SQL> Rem cbauwens 12/03/04 - add call to olp_v3.sql for cube metadata SQL> Rem cbauwens 10/29/04 - modifying privs after deprecation of connect SQL> Rem cbauwens 07/26/04 - remove stylesheet tab SQL> Rem rsahani 09/08/04 - privileges granted must be same SQL> Rem as granted when creating schema SQL> Rem jcjeon 03/30/04 - fix lrg1628995 SQL> Rem huzhao 01/28/04 - validate certain AQ within IX schema after TTS import SQL> Rem cbauwens 11/18/03 - lrg1582814 SQL> Rem cbauwens 08/21/03 - OMF support SQL> Rem cbauwens 08/05/03 - profits view SQL> Rem cbauwens 08/05/03 - company_id SQL> Rem cbauwens 06/19/03 - bug_2878871 SQL> Rem cbauwens 06/18/03 - bug_2878871 SQL> Rem ahunold 03/27/03 - Objects not transported: lrg 1348159 SQL> Rem ahunold 03/01/03 - Bug 2828348 SQL> Rem ahunold 02/10/03 - grants AFTER mk_dir, TS ver. query SQL> Rem ahunold 01/27/03 - RMAN restore SQL> Rem ahunold 01/16/03 - CONNECT errors SQL> Rem ahunold 12/11/02 - password variables, line continuation SQL> Rem ahunold 09/30/02 - procedures, directories SQL> Rem ahunold 09/25/02 - imp logfile SQL> Rem ahunold 09/18/02 - Created SQL> Rem SQL> SQL> SET FEEDBACK 1 SQL> SET NUMWIDTH 10 SQL> SET LINESIZE 80 SQL> SET TRIMSPOOL ON SQL> SET TAB OFF SQL> SET PAGESIZE 999 SQL> SET ECHO OFF specify password for SYS as parameter 1: specify password for HR as parameter 2: specify password for OE as parameter 3: specify password for PM as parameter 4: specify password for IX as parameter 5: specify password for SH as parameter 6: specify password for BI as parameter 7: specify INPUT metadata import file as parameter 8: specify INPUT database backup file for tablespace EXAMPLE as parameter 9: specify OUTPUT database file for tablespace EXAMPLE as parameter 10: specify OUTPUT log directory as parameter 11: Sample Schemas are being plugged in ... Connected. TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:09 1 row selected. User created. User created. User created. User created. User created. User created. SQL> SET FEEDBACK 1 SQL> SET NUMWIDTH 10 SQL> SET LINESIZE 80 SQL> SET TRIMSPOOL ON SQL> SET TAB OFF SQL> SET PAGESIZE 100 SQL> SQL> CREATE OR REPLACE DIRECTORY data_file_dir AS '/db/u01/app/oracle/product/10.2.0/db/demo/schema/sales_history/'; Directory created. SQL> CREATE OR REPLACE DIRECTORY log_file_dir AS '/db/u01/app/oracle/product/10.2.0/db/demo/schema/log/'; Directory created. SQL> CREATE OR REPLACE DIRECTORY media_dir AS '/db/u01/app/oracle/product/10.2.0/db/demo/schema/product_media/'; Directory created. SQL> SQL> GRANT READ ON DIRECTORY media_dir TO pm; Grant succeeded. SQL> GRANT READ ON DIRECTORY log_file_dir TO sh; Grant succeeded. SQL> GRANT READ ON DIRECTORY data_file_dir TO sh; Grant succeeded. SQL> GRANT WRITE ON DIRECTORY log_file_dir TO sh; Grant succeeded. SQL> EXECUTE DBMS_DATAPUMP_UTL.REPLACE_DEFAULT_DIR; PL/SQL procedure successfully completed. SQL> SQL> GRANT CREATE SESSION TO hr; Grant succeeded. SQL> GRANT ALTER SESSION TO hr; Grant succeeded. SQL> GRANT CREATE DATABASE LINK TO hr; Grant succeeded. SQL> GRANT CREATE SEQUENCE TO hr; Grant succeeded. SQL> GRANT CREATE SYNONYM TO hr; Grant succeeded. SQL> GRANT CREATE VIEW TO hr; Grant succeeded. SQL> GRANT RESOURCE TO hr; Grant succeeded. SQL> GRANT execute ON sys.dbms_stats TO hr; Grant succeeded. SQL> SQL> GRANT CREATE SESSION TO oe; Grant succeeded. SQL> GRANT CREATE DATABASE LINK TO oe; Grant succeeded. SQL> GRANT CREATE SYNONYM TO oe; Grant succeeded. SQL> GRANT CREATE VIEW TO oe; Grant succeeded. SQL> GRANT RESOURCE TO oe; Grant succeeded. SQL> GRANT CREATE MATERIALIZED VIEW TO oe; Grant succeeded. SQL> GRANT QUERY REWRITE TO oe; Grant succeeded. SQL> GRANT execute ON sys.dbms_stats TO oe; Grant succeeded. SQL> SQL> GRANT CONNECT TO pm; Grant succeeded. SQL> GRANT RESOURCE TO pm; Grant succeeded. SQL> GRANT execute ON sys.dbms_stats TO pm; Grant succeeded. SQL> GRANT READ ON DIRECTORY media_dir TO pm; Grant succeeded. SQL> SQL> GRANT CONNECT TO ix; Grant succeeded. SQL> GRANT RESOURCE TO ix; Grant succeeded. SQL> SQL> GRANT aq_administrator_role TO ix; Grant succeeded. SQL> GRANT aq_user_role TO ix; Grant succeeded. SQL> SQL> GRANT ALTER SESSION TO ix; Grant succeeded. SQL> GRANT CREATE CLUSTER TO ix; Grant succeeded. SQL> GRANT CREATE DATABASE LINK TO ix; Grant succeeded. SQL> GRANT CREATE SEQUENCE TO ix; Grant succeeded. SQL> GRANT CREATE SESSION TO ix; Grant succeeded. SQL> GRANT CREATE SYNONYM TO ix; Grant succeeded. SQL> GRANT CREATE TABLE TO ix; Grant succeeded. SQL> GRANT CREATE VIEW TO ix; Grant succeeded. SQL> GRANT CREATE CLUSTER TO ix; Grant succeeded. SQL> GRANT CREATE INDEXTYPE TO ix; Grant succeeded. SQL> GRANT CREATE OPERATOR TO ix; Grant succeeded. SQL> GRANT CREATE PROCEDURE TO ix; Grant succeeded. SQL> GRANT CREATE SEQUENCE TO ix; Grant succeeded. SQL> GRANT CREATE TABLE TO ix; Grant succeeded. SQL> GRANT CREATE TRIGGER TO ix; Grant succeeded. SQL> GRANT CREATE TYPE TO ix; Grant succeeded. SQL> GRANT CREATE SESSION TO ix; Grant succeeded. SQL> SQL> GRANT CONNECT, RESOURCE, SELECT_CATALOG_ROLE TO ix; Grant succeeded. SQL> SQL> GRANT EXECUTE ON sys.dbms_stats TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_AQ TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_AQADM TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_APPLY_ADM TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_CAPTURE_ADM TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_FLASHBACK TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_PROPAGATION_ADM TO ix; Grant succeeded. SQL> GRANT EXECUTE ON DBMS_STREAMS_ADM TO ix; Grant succeeded. SQL> GRANT SELECT ANY DICTIONARY TO ix; Grant succeeded. SQL> SQL> EXECUTE DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( - > privilege => DBMS_RULE_ADM.CREATE_RULE_SET_OBJ, - > grantee => 'ix', - > grant_option => FALSE); PL/SQL procedure successfully completed. SQL> SQL> EXECUTE DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( - > privilege => DBMS_RULE_ADM.CREATE_RULE_OBJ, - > grantee => 'ix', - > grant_option => FALSE); PL/SQL procedure successfully completed. SQL> SQL> GRANT CREATE SESSION TO sh; Grant succeeded. SQL> GRANT CREATE TABLE TO sh; Grant succeeded. SQL> GRANT CREATE VIEW TO sh; Grant succeeded. SQL> GRANT CREATE CLUSTER TO sh; Grant succeeded. SQL> GRANT ALTER SESSION TO sh; Grant succeeded. SQL> GRANT CREATE SEQUENCE TO sh; Grant succeeded. SQL> GRANT CREATE SYNONYM TO sh; Grant succeeded. SQL> GRANT CREATE DATABASE LINK TO sh; Grant succeeded. SQL> GRANT CREATE DIMENSION TO sh; Grant succeeded. SQL> GRANT QUERY REWRITE TO sh; Grant succeeded. SQL> GRANT CREATE MATERIALIZED VIEW TO sh; Grant succeeded. SQL> GRANT CREATE VIEW TO sh; Grant succeeded. SQL> GRANT RESOURCE TO sh; Grant succeeded. SQL> GRANT select_catalog_role TO sh; Grant succeeded. SQL> GRANT execute ON sys.dbms_stats TO sh; Grant succeeded. SQL> rem ALTER USER sh GRANT CONNECT THROUGH olapsvr; SQL> SQL> GRANT CREATE SESSION TO bi; Grant succeeded. SQL> GRANT CREATE TABLE TO bi; Grant succeeded. SQL> GRANT CREATE VIEW TO bi; Grant succeeded. SQL> GRANT CREATE CLUSTER TO bi; Grant succeeded. SQL> GRANT ALTER SESSION TO bi; Grant succeeded. SQL> GRANT CREATE SEQUENCE TO bi; Grant succeeded. SQL> GRANT CREATE SYNONYM TO bi; Grant succeeded. SQL> GRANT CREATE DATABASE LINK TO bi; Grant succeeded. SQL> GRANT RESOURCE TO bi; Grant succeeded. SQL> SQL> -- SQL> -- Restoring database file backup SQL> -- (Using RMAN works in OMF, OCFS, raw devices and in normal file systems) SQL> -- SQL> SQL> SQL> set echo off; TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:10 1 row selected. Allocating device.... Specifying datafiles... Specifing datafiles... Restoring ... Restore done. PL/SQL procedure successfully completed. 1 row selected. TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:14 1 row selected. Import: Release 10.2.0.1.0 - Production on Tue Aug 25 11:08:14 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning and Data Mining options Export file created by EXPORT:V10.02.01 via conventional path About to import transportable tablespace(s) metadata... import done in JA16EUC character set and AL16UTF16 NCHAR character set import server uses US7ASCII character set (possible charset conversion) export client uses US7ASCII character set (possible charset conversion) . importing SYS's objects into SYS . importing SYS's objects into SYS . importing HR's objects into HR . . importing table "REGIONS" . . importing table "COUNTRIES" . . importing table "LOCATIONS" . . importing table "DEPARTMENTS" . . importing table "JOBS" . . importing table "EMPLOYEES" . . importing table "JOB_HISTORY" . importing OE's objects into OE . . importing table "CUSTOMERS" . . importing table "WAREHOUSES" . . importing table "ORDER_ITEMS" . . importing table "ORDERS" . . importing table "INVENTORIES" . . importing table "PRODUCT_INFORMATION" . . importing table "PRODUCT_DESCRIPTIONS" . . importing table "PROMOTIONS" . importing PM's objects into PM . . importing table "ONLINE_MEDIA" . . importing table "PRINT_MEDIA" . importing IX's objects into IX . . importing table "ORDERS_QUEUETABLE" . . importing table "AQ$_ORDERS_QUEUETABLE_S" . . importing table "AQ$_ORDERS_QUEUETABLE_T" . . importing table "AQ$_ORDERS_QUEUETABLE_H" . . importing table "AQ$_ORDERS_QUEUETABLE_G" . . importing table "AQ$_ORDERS_QUEUETABLE_I" . . importing table "STREAMS_QUEUE_TABLE" . . importing table "AQ$_STREAMS_QUEUE_TABLE_S" . . importing table "AQ$_STREAMS_QUEUE_TABLE_T" . . importing table "AQ$_STREAMS_QUEUE_TABLE_H" . . importing table "AQ$_STREAMS_QUEUE_TABLE_G" . . importing table "AQ$_STREAMS_QUEUE_TABLE_I" . . importing table "AQ$_STREAMS_QUEUE_TABLE_C" . importing SH's objects into SH . . importing table "SALES" . . importing table "COSTS" . . importing table "TIMES" . . importing table "PRODUCTS" . . importing table "CHANNELS" . . importing table "PROMOTIONS" . . importing table "CUSTOMERS" . . importing table "COUNTRIES" . . importing table "SUPPLEMENTARY_DEMOGRAPHICS" . . importing table "MVIEW$_EXCEPTIONS" . . importing table "CAL_MONTH_SALES_MV" . . importing table "FWEEK_PSCAT_SALES_MV" . importing HR's objects into HR . importing OE's objects into OE . importing PM's objects into PM . importing SH's objects into SH . importing OE's objects into OE . importing PM's objects into PM . importing IX's objects into IX . importing SH's objects into SH . . importing table "DR$SUP_TEXT_IDX$I" . . importing table "DR$SUP_TEXT_IDX$K" . . importing table "DR$SUP_TEXT_IDX$R" . . importing table "DR$SUP_TEXT_IDX$N" . importing OE's objects into OE . importing IX's objects into IX . importing HR's objects into HR About to enable constraints... . importing OE's objects into OE . importing SYS's objects into SYS Import terminated successfully without warnings. Connected. TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:27 1 row selected. Tablespace altered. TABLESPACE_NAME FILE_NAME --------------- ---------------------------------------------- STATUS --------------------------- SYSTEM /db/ora/testdb/system01.dbf AVAILABLE UNDOTBS1 /db/ora/testdb/undotbs01.dbf AVAILABLE SYSAUX /db/ora/testdb/sysaux01.dbf AVAILABLE USERS /db/ora/testdb/users01.dbf AVAILABLE EXAMPLE /db/ora/testdb/example01.dbf AVAILABLE 5 rows selected. Creating sequences, views, procedures and objects privileges for HR ... TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:27 1 row selected. Connected. Sequence created. Sequence created. Sequence created. View created. Procedure created. Trigger created. Trigger altered. Procedure created. Trigger created. Commit complete. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Creating synonyms, sequences, views and functions for OE ... TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:27 1 row selected. Connected. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Sequence created. View created. View created. View created. View created. View created. View created. Function created. View created. View created. Creating XML schema, XML folders, OC subschema and objects privileges for OE ... TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:27 1 row selected. specify password for OE as parameter 1: PROMPT password for SYS as parameter 2: Connected. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. 1* GRANT alter session TO oe Grant succeeded. View created. View created. Grant succeeded. Session altered. Package created. Warning: Package Body created with compilation errors. View created. Package altered. View altered. Grant succeeded. Trigger created. Synonym created. Grant succeeded. Call completed. Session altered. Session altered. Function created. no rows selected Synonym created. Grant succeeded. Package created. no rows selected Synonym created. Grant succeeded. Package created. no rows selected Package body created. no rows selected Synonym created. Grant succeeded. Package created. no rows selected Package body created. no rows selected Grant succeeded. Synonym created. Package created. no rows selected Package body created. no rows selected Synonym created. Grant succeeded. PL/SQL procedure successfully completed. Connected. Directory created. Commit complete. Connected. Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Call completed. Call completed. PL/SQL procedure successfully completed. Connected. Revoke succeeded. Revoke succeeded. Revoke succeeded. Package dropped. Package dropped. Package dropped. Package dropped. Package dropped. Trigger dropped. View dropped. Connected. Session altered. ...creating subschema OC in OE Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type created. Type body created. Type created. Type body created. Type created. Type body created. Table created. View created. View created. View created. View created. View created. View created. Trigger created. Trigger created. Commit complete. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. 1 row created. Type altered. 3 rows updated. 8 rows updated. 6 rows updated. 4 rows updated. Commit complete. Type body altered. Type body altered. Type body altered. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Creating dimensions, materialized views, external table and object privileges for SH ... TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:36 1 row selected. Connected. Dimension created. Commit complete. PL/SQL procedure successfully completed. no rows selected Dimension created. PL/SQL procedure successfully completed. no rows selected Dimension created. PL/SQL procedure successfully completed. no rows selected Dimension created. PL/SQL procedure successfully completed. no rows selected Dimension created. PL/SQL procedure successfully completed. no rows selected TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:40 1 row selected. View created. Materialized view created. Materialized view created. Table created. Creating OLAP metadata ... <<<<< CREATE CWMLite Metadata for the Sales History Schema >>>>> - <<<<< CREATE CATALOG sh_cat for Sales History >>>>> No catalog to drop CWM Collect Garbage - <<<<< CREATE the Sales CUBE >>>>> Sales amount, Sales quantity Drop SALES_CUBE prior to recreation No cube to drop Add dimensions - to SALES_CUBE and map the foreign keys Create measures - for SALES_CUBE and map to columns in the fact table Set default aggregation method - to SUM for all measures over TIME Add SALES_CUBE to the catalog SALES_CUBE successfully added to sh_cat - <<<<< CREATE the Cost CUBE >>>>> Unit Cost, Unit Price < TIMES PRODUCTS CHANNELS PROMOTIONS > Drop COST_CUBE prior to recreation No cube to drop Add dimensions - to COST_CUBE and map the foreign keys Create measures - for COST_CUBE and map to columns in the fact table Set default aggregation method - to SUM for all measures over TIME Add COST_CUBE to the catalog COST_CUBE successfully added to sh_cat - <<<<< TIME DIMENSION >>>>> Dimension - display name, description and plural name Level - display name and description Hierarchy - display name and description - default calculation hierarchy - default display hierarchy Level Attributes - name, display name, description Drop dimension attributes prior to re-creation Create dimension attributes and add their level attributes - Long Description created - Short Description created - Period Number of Days created - Period End Date created Classify entity descriptor use - Time dimension - Long description - Day name - Calendar month description - Calendar quarter description - Fiscal month description - Fiscal quarter description - Short Description - Day name - Calendar month description - Calendar quarter description - Fiscal month description - Fiscal quarter description - Time Span - Days in calendar month - Days in calendar quarter - Days in calendar year - Days in fiscal month - Days in fiscal quarter - Days in fiscal year - End Date - End of calendar month - End of calendar quarter - End of calendar year - End of fiscal month - End of fiscal quarter - End of fiscal year - <<<<< CUSTOMERS DIMENSION >>>>> Dimension - display name, description and plural name Level - display name and description Hierarchy - display name and description - default calculation hierarchy - default display hierarchy Level Attributes - name, display name, description Drop dimension attributes prior to re-creation No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop No attribute to drop Create dimension attributes and add their level attributes - Long Description created - Short Description created - Other Customer Information created Classify entity descriptor use - Long Description - Short Description - <<<<< PRODUCTS DIMENSION >>>>> Dimension - display name, description and plural name Level - display name and description Hierarchy - display name and description - default calculation hierarchy - default display hierarchy Level Attributes - name, display name, description Drop dimension attributes prior to re-creation No attribute to drop Create dimension attributes and add their level attributes - Long Description created - Short Description created Classify entity descriptor use - Long Description - Short Description - <<<<< PROMOTIONS DIMENSION >>>>> Dimension - display name, description and plural name Level - display name and description Hierarchy - display name and description - default calculation hierarchy - default display hierarchy Level Attributes - name, display name, description Drop dimension attributes prior to re-creation No attribute to drop Create dimension attributes and add their level attributes - Long Description created - Short Description created Classify entity descriptor use - Long Description - Short Description - <<<<< CHANNELS DIMENSION >>>>> Dimension - display name, description and plural name Level - display name and description Hierarchy - display name and description - default calculation hierarchy - default display hierarchy Level Attributes - name, display name, description Drop dimension attributes prior to re-creation No attribute to drop Create dimension attributes and add their level attributes - Long Description created - Short Description created Classify entity descriptor use - Long Description - Short Description - <<<<< FINAL PROCESSING >>>>> - Changes have been committed PL/SQL procedure successfully completed. Commit complete. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Grant succeeded. Creating views, synonyms for BI ... TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:42 1 row selected. specify password for BI as parameter 1: Connected. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Synonym created. Commit complete. Connected. PL/SQL procedure successfully completed. Connected. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. mkplug.sql DONE TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH:MI:SS') --------------------------------------------------- 20090825 11:08:43 1 row selected. Connected. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes Database mounted. Database opened. System altered. SID ---------- PROGRAM -------------------------------------------------------------------------------- SERIAL# ---------- USERNAME -------------------------------------------------------------------------------- 45 oracle@localhost.localdomain (QMNC) 1 48 oracle@localhost.localdomain (MMNL) 2 50 sqlplus@localhost.localdomain (TNS V1-V3) 3 SYS 52 oracle@localhost.localdomain (MMON) 3 53 oracle@localhost.localdomain (RECO) 1 54 oracle@localhost.localdomain (SMON) 1 55 oracle@localhost.localdomain (CKPT) 1 56 oracle@localhost.localdomain (LGWR) 1 57 oracle@localhost.localdomain (DBW0) 1 58 oracle@localhost.localdomain (MMAN) 1 59 oracle@localhost.localdomain (PSP0) 1 60 oracle@localhost.localdomain (PMON) 1 12 rows selected. Database altered. Database altered. User altered. User altered. System altered. Connected. SQL> spool /db/u01/app/oracle/admin/testdb/scripts/postScripts.log SQL> @/db/u01/app/oracle/product/10.2.0/db/rdbms/admin/dbmssml.sql; SQL> CREATE OR REPLACE LIBRARY dbms_sumadv_lib AS '/db/u01/app/oracle/product/10.2.0/db/lib/libqsmashr.so'; 2 / Library created. SQL> execute dbms_datapump_utl.replace_default_dir; PL/SQL procedure successfully completed. SQL> commit; Commit complete. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> alter session set current_schema=ORDSYS; Session altered. SQL> @/db/u01/app/oracle/product/10.2.0/db/ord/im/admin/ordlib.sql; SQL> create or replace library ORDIMLIBS as '/db/u01/app/oracle/product/10.2.0/db/lib/libordim10.so'; 2 / Library created. SQL> create or replace library ORDIMLIBT trusted as static; 2 / Library created. SQL> SQL> Rem ordimasf.jar is only available via download from the SQL> Rem Oracle Technology Network website. Go to the interMedia section of SQL> Rem http://otn.oracle.com. SQL> Rem SQL> Rem Uncomment the following lines after downloading ordimasf.jar. SQL> SQL> -- BEGIN SQL> -- dbms_java.loadjava('-synonym -schema ORDSYS -resolve -grant PUBLIC ord/jlib/ordimasf.jar'); SQL> -- EXCEPTION SQL> -- WHEN OTHERS THEN SQL> -- NULL; SQL> -- END; SQL> -- / SQL> alter session set current_schema=SYS; Session altered. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> alter user CTXSYS account unlock identified by change_on_install; User altered. SQL> connect "CTXSYS"/"change_on_install" Connected. SQL> @/db/u01/app/oracle/product/10.2.0/db/ctx/admin/defaults/dr0defdp.sql; SQL> Rem SQL> Rem $Header: dr0defdp.sql 27-mar-2002.14:31:53 gkaminag Exp $ SQL> Rem SQL> Rem dr0defdp.sql SQL> Rem SQL> Rem Copyright (c) 2002, Oracle Corporation. All rights reserved. SQL> Rem SQL> Rem NAME SQL> Rem dr0defdp.sql SQL> Rem SQL> Rem DESCRIPTION SQL> Rem drop default preferences. SQL> Rem SQL> Rem NOTES SQL> Rem SQL> Rem SQL> Rem MODIFIED (MM/DD/YY) SQL> Rem gkaminag 03/27/02 - gkaminag_bug-2283146 SQL> Rem ehuang 03/27/02 - Created SQL> Rem SQL> SQL> PROMPT dropping default lexer preference... dropping default lexer preference... SQL> SQL> begin 2 CTX_DDL.drop_preference('DEFAULT_LEXER'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT dropping default wordlist preference... dropping default wordlist preference... SQL> SQL> begin 2 CTX_DDL.drop_preference('DEFAULT_WORDLIST'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT dropping default stoplist preference... dropping default stoplist preference... SQL> SQL> begin 2 CTX_DDL.drop_stoplist('DEFAULT_STOPLIST'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT dropping default policy... dropping default policy... SQL> SQL> begin 2 CTX_DDL.drop_policy('DEFAULT_POLICY_ORACONTAINS'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> @/db/u01/app/oracle/product/10.2.0/db/ctx/admin/defaults/dr0defin.sql "JAPANESE"; SQL> Rem SQL> Rem $Header: dr0defin.sql 29-mar-2002.18:46:47 gkaminag Exp $ SQL> Rem SQL> Rem dr0defin.sql SQL> Rem SQL> Rem Copyright (c) 2002, Oracle Corporation. All rights reserved. SQL> Rem SQL> Rem NAME SQL> Rem dr0defin.sql - dr0 DEFault preference INstall SQL> Rem SQL> Rem DESCRIPTION SQL> Rem based on passed-in language name, run the appropriate SQL> Rem language-specific default preference install script SQL> Rem SQL> Rem NOTES SQL> Rem SQL> Rem SQL> Rem MODIFIED (MM/DD/YY) SQL> Rem gkaminag 03/29/02 - gkaminag_bug-2283146 SQL> Rem gkaminag 03/29/02 - Created SQL> Rem SQL> SQL> SQL> DEFINE nls_language = "&1" SQL> COLUMN lang_abbr NEW_VALUE lang_abbr SQL> SQL> SELECT DECODE('&nls_language', 2 'AMERICAN', 'us', 3 'ARABIC', 'ar', 4 'BANGLA', 'bn', 5 'BRAZILIAN PORTUGUESE', 'ptb', 6 'BULGARIAN', 'bg', 7 'CANADIAN FRENCH', 'frc', 8 'CATALAN', 'ca', 9 'CROATIAN', 'hr', 10 'CZECH', 'cs', 11 'DANISH', 'dk', 12 'DUTCH', 'nl', 13 'EGYPTIAN', 'eg', 14 'ENGLISH', 'gb', 15 'ESTONIAN', 'et', 16 'FINNISH', 'sf', 17 'FRENCH', 'f', 18 'GERMAN DIN', 'din', 19 'GERMAN', 'd', 20 'GREEK', 'el', 21 'HEBREW', 'iw', 22 'HUNGARIAN', 'hu', 23 'ICELANDIC', 'is', 24 'INDONESIAN', 'in', 25 'ITALIAN', 'i', 26 'JAPANESE', 'ja', 27 'KOREAN', 'ko', 28 'LATIN AMERICAN SPANISH', 'esa', 29 'LATVIAN', 'lv', 30 'LITHUANIAN', 'lt', 31 'MALAY', 'ms', 32 'MEXICAN SPANISH', 'esm', 33 'NORWEGIAN', 'n', 34 'POLISH', 'pl', 35 'PORTUGUESE', 'pt', 36 'ROMANIAN', 'ro', 37 'RUSSIAN', 'ru', 38 'SIMPLIFIED CHINESE', 'zhs', 39 'SLOVAK', 'sk', 40 'SLOVENIAN', 'sl', 41 'SPANISH', 'e', 42 'SWEDISH', 's', 43 'THAI', 'th', 44 'TRADITIONAL CHINESE', 'zht', 45 'TURKISH', 'tr', 46 'UKRAINIAN', 'uk', 47 'VIETNAMESE', 'vn', 48 'us') 49 lang_abbr FROM dual; LA -- ja 1 row selected. SQL> SQL> @@drdef&lang_abbr..sql SQL> Rem SQL> Rem $Header: drdefja.sql 20-nov-2001.12:37:48 gkaminag Exp $ SQL> Rem SQL> Rem drdefja.sql SQL> Rem SQL> Rem Copyright (c) 1998, 2001, Oracle Corporation. All rights reserved. SQL> Rem SQL> Rem NAME SQL> Rem drdefja.sql - SQL> Rem SQL> Rem DESCRIPTION SQL> Rem default preference for Japanese SQL> Rem SQL> Rem NOTES SQL> Rem SQL> Rem SQL> Rem MODIFIED (MM/DD/YY) SQL> Rem gkaminag 11/20/01 - policy name to default_policy_oracontains SQL> Rem gkaminag 10/23/01 - default policy SQL> Rem ehuang 04/12/01 - add description SQL> Rem mfaisal 10/05/98 - change default stemmer to NULL SQL> Rem ehuang 09/04/98 - language-specific defaults SQL> Rem ehuang 09/04/98 - Created SQL> Rem SQL> SQL> PROMPT Creating lexer preference... Creating lexer preference... SQL> begin 2 CTX_DDL.create_preference('DEFAULT_LEXER','JAPANESE_VGRAM_LEXER'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT Creating wordlist preference... Creating wordlist preference... SQL> begin 2 CTX_DDL.create_preference('DEFAULT_WORDLIST','BASIC_WORDLIST'); 3 CTX_DDL.set_attribute('DEFAULT_WORDLIST','STEMMER', 'NULL'); 4 CTX_DDL.set_attribute('DEFAULT_WORDLIST','FUZZY_MATCH', 'JAPANESE_VGRAM'); 5 end; 6 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT Creating stoplist... Creating stoplist... SQL> begin 2 CTX_DDL.create_stoplist('DEFAULT_STOPLIST'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> SQL> PROMPT Creating default policy... Creating default policy... SQL> begin 2 CTX_DDL.create_policy('DEFAULT_POLICY_ORACONTAINS', 3 filter => 'CTXSYS.NULL_FILTER', 4 section_group => 'CTXSYS.NULL_SECTION_GROUP', 5 lexer => 'CTXSYS.DEFAULT_LEXER', 6 stoplist => 'CTXSYS.DEFAULT_STOPLIST', 7 wordlist => 'CTXSYS.DEFAULT_WORDLIST' 8 ); 9 end; 10 / PL/SQL procedure successfully completed. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> execute dbms_swrf_internal.cleanup_database(cleanup_local => FALSE); PL/SQL procedure successfully completed. SQL> commit; Commit complete. SQL> spool off SQL> @/db/u01/app/oracle/admin/testdb/scripts/postDBCreation.sql SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> set echo on SQL> spool /db/u01/app/oracle/admin/testdb/scripts/postDBCreation.log SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected to an idle instance. SQL> startup mount pfile="/db/u01/app/oracle/admin/testdb/scripts/init.ora"; ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes Database mounted. SQL> alter database archivelog; Database altered. SQL> alter database open; Database altered. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> set echo on SQL> create spfile='/db/u01/app/oracle/product/10.2.0/db/dbs/spfiletestdb.ora' FROM pfile='/db/u01/app/oracle/admin/testdb/scripts/init.ora'; File created. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected to an idle instance. SQL> startup ; ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes Database mounted. Database opened. SQL> alter user SYSMAN identified by "&&sysmanPassword" account unlock; User altered. SQL> alter user DBSNMP identified by "&&dbsnmpPassword" account unlock; User altered. SQL> select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual; 'UTL_RECOMP_BEGIN:'||TO_CH -------------------------- utl_recomp_begin: 11:11:00 1 row selected. SQL> execute utl_recomp.recomp_serial(); PL/SQL procedure successfully completed. SQL> select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual; 'UTL_RECOMP_END:'||TO_CH ------------------------ utl_recomp_end: 11:11:06 1 row selected. SQL> host /db/u01/app/oracle/product/10.2.0/db/bin/emca -config dbcontrol db -silent -DB_UNIQUE_NAME testdb -PORT 1521 -EM_HOME /db/u01/app/oracle/product/10.2.0/db -LISTENER LISTENER -SERVICE_NAME testdb -SYS_PWD &&sysPassword -SID testdb -ORACLE_HOME /db/u01/app/oracle/product/10.2.0/db -DBSNMP_PWD &&dbsnmpPassword -HOST localhost.localdomain -LISTENER_OH /db/u01/app/oracle/product/10.2.0/db -LOG_FILE /db/u01/app/oracle/admin/testdb/scripts/emConfig.log -SYSMAN_PWD &&sysmanPassword; EMCAの開始: 2009/08/25 11:11:07 EMコンフィギュレーション・アシスタント, リリース10.2.0.1.0製品 Copyright (c) 2003, 2005, Oracle. All rights reserved. 2009/08/25 11:11:07 oracle.sysman.emcp.EMConfig perform 情報: この操作は/db/u01/app/oracle/admin/testdb/scripts/emConfig.logでロギングされています。 2009/08/25 11:11:08 oracle.sysman.emcp.DatabaseChecks performReposChecks 警告: shared_pool_sizeは80MB以上である必要があります。 2009/08/25 11:11:10 oracle.sysman.emcp.util.DBControlUtil stopOMS 情報: Database Controlの停止中(少し時間がかかります)... 2009/08/25 11:11:18 oracle.sysman.emcp.util.DBControlUtil startOMS 情報: Database Controlの起動中(少し時間がかかります)... 2009/08/25 11:12:53 oracle.sysman.emcp.EMDBPostConfig performConfiguration 情報: Database Controlは正常に起動されました 2009/08/25 11:12:53 oracle.sysman.emcp.EMDBPostConfig performConfiguration 情報: >>>>>>>>>>> Database ControlのURLはhttp://localhost.localdomain:1158/emです <<<<<<<<<<< Enterprise Managerの構成が正常に完了しました EMCAの終了: 2009/08/25 11:12:53 SQL> spool /db/u01/app/oracle/admin/testdb/scripts/postDBCreation.log SQL> SQL>