|
oracleasm的绑定:
上完1Z0-052 第2章 安装软件(2/40)
cloneDBCreation.sql:
- SET VERIFY OFF
- connect "SYS"/"&&sysPassword" as SYSDBA
- set echo on
- spool /u01/app/oracle/admin/orcl/scripts/cloneDBCreation.log append
- Create controlfile reuse set database "orcl"
- MAXINSTANCES 8
- MAXLOGHISTORY 1
- MAXLOGFILES 16
- MAXLOGMEMBERS 3
- MAXDATAFILES 100
- Datafile
- '&&file0',
- '&&file1',
- '&&file2',
- '&&file3'
- LOGFILE GROUP 1 SIZE 51200K,
- GROUP 2 SIZE 51200K,
- GROUP 3 SIZE 51200K RESETLOGS;
- select name from v$controlfile;
- exec dbms_backup_restore.zerodbid(0);
- shutdown immediate;
- startup nomount pfile="/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora";
- Create controlfile reuse set database "orcl"
- MAXINSTANCES 8
- MAXLOGHISTORY 1
- MAXLOGFILES 16
- MAXLOGMEMBERS 3
- MAXDATAFILES 100
- Datafile
- '&&file0',
- '&&file1',
- '&&file2',
- '&&file3'
- LOGFILE GROUP 1 SIZE 51200K,
- GROUP 2 SIZE 51200K,
- GROUP 3 SIZE 51200K RESETLOGS;
- alter system enable restricted session;
- alter database "orcl" open resetlogs;
- exec dbms_service.delete_service('seeddata');
- exec dbms_service.delete_service('seeddataXDB');
- alter database rename global_name to "orcl.example.com";
- set linesize 2048;
- column ctl_files NEW_VALUE ctl_files;
- select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
- host echo &ctl_files >>/u01/app/oracle/admin/orcl/scripts/init.ora;
- host echo &ctl_files >>/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora;
- ALTER TABLESPACE TEMP ADD TEMPFILE SIZE 20480K AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED;
- select tablespace_name from dba_tablespaces where tablespace_name='USERS';
- alter system disable restricted session;
- connect "SYS"/"&&sysPassword" as SYSDBA
- @/u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/mkplug.sql &&sysPassword change_on_install change_on_install change_on_install change_on_install change_on_install change_on_install example.dmp example01.dfb +DATA/orcl/example01.dbf /u01/app/oracle/admin/orcl/scripts/ /u01/app/oracle/product/11.2.0/dbhome_1/assistants/dbca/templates/ "\'SYS/&&sysPassword as SYSDBA\'";
- connect "SYS"/"&&sysPassword" as SYSDBA
- shutdown immediate;
- connect "SYS"/"&&sysPassword" as SYSDBA
- startup restrict pfile="/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora";
- select sid, program, serial#, username from v$session;
- alter database character set INTERNAL_CONVERT AL32UTF8;
- alter database national character set INTERNAL_CONVERT AL16UTF16;
- alter user sys account unlock identified by "&&sysPassword";
- alter user system account unlock identified by "&&systemPassword";
- alter system disable restricted session;
复制代码 CreateDB.sql:
- SET VERIFY OFF
- connect "SYS"/"&&sysPassword" as SYSDBA
- set echo on
- spool /u01/app/oracle/admin/cust/scripts/CreateDB.log append
- startup nomount pfile="/u01/app/oracle/admin/cust/scripts/init.ora";
- CREATE DATABASE "cust"
- MAXINSTANCES 8
- MAXLOGHISTORY 1
- MAXLOGFILES 16
- MAXLOGMEMBERS 3
- MAXDATAFILES 100
- DATAFILE SIZE 700M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
- EXTENT MANAGEMENT LOCAL
- SYSAUX DATAFILE SIZE 600M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
- SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
- SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
- CHARACTER SET AL32UTF8
- NATIONAL CHARACTER SET AL16UTF16
- LOGFILE GROUP 1 SIZE 512000K,
- GROUP 2 SIZE 512000K,
- GROUP 3 SIZE 512000K
- USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
- set linesize 2048;
- column ctl_files NEW_VALUE ctl_files;
- select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
- host echo &ctl_files >>/u01/app/oracle/admin/cust/scripts/init.ora;
- spool off
复制代码
上完1Z0-052 第3章 建库(3/40) |
|