connect internal connect internal ; disconnect connect connect internal create rollback segment r0 tablespace system storage (initial 16k next 16k minextents 2 maxextents 20); alter rollback segment r0 online; create tablespace rbs datafile '/apps/DATABASE/RBS.dbf'size 50M default storage ( initial 128k next 128k pctincrease 0 minextents 2 ); create tablespace temp datafile '/apps/DATABASE/TEMP.dbf'size 50M default storage ( initial 256k next 256k pctincrease 0 ); create tablespace tools datafile '/apps/DATABASE/TOOL.dbf'size 20m; create rollback segment r01 tablespace rbs; create rollback segment r02 tablespace rbs; alter rollback segment r01 online; alter rollback segment r0 offline; drop rollback segment r0; alter user sys temporary tablespace temp; alter user system default tablespace tools temporary tablespace temp; connect 2. DataBase 2. DataBase">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Database 1. IP : X.X.X.X 2. Root : root / 3. Unix : oracle8 / XXXXXX 4. DB Version : 8.1.6 5. UNIX version : sun_solaris 2.6.1 6.SID : TESTDB.

Similar presentations


Presentation on theme: "Database Database 1. IP : X.X.X.X 2. Root : root / 3. Unix : oracle8 / XXXXXX 4. DB Version : 8.1.6 5. UNIX version : sun_solaris 2.6.1 6.SID : TESTDB."— Presentation transcript:

1 Database Database 1. IP : X.X.X.X 2. Root : root / 3. Unix : oracle8 / XXXXXX 4. DB Version : 8.1.6 5. UNIX version : sun_solaris 2.6.1 6.SID : TESTDB 6.SID : TESTDB 7. Datafile : /apps/DATABASE 8. COLD_BACKUP: /apps/DATABASE/BACKUP

2 1. Database 1. Database Unix : /apps/oracle8/app cd /apps/oracle8/app/admin/TESTDB/pfile cd $ORACLE_HOME /apps/oracle8/app/product/8.1.6 cd dbs configTESTDB.ora -> /apps/oracle8/app/admin/TESTDB/pfile/configTESTDB.ora initTESTDB.ora -> /apps/oracle8/app/admin/TESTDB/pfile/initTESTDB.ora cd $TNS_ADMIN /apps/oracle8/app/product/8.1.6/network/admin cd /apps/oracle8/app/admin/TESTDB/bdump cd /apps/oracle8/app/admin/TESTDB/create cd /apps/oracle8/app/product/8.1.6/rdbms/admin configTESTDB.ora initTESTDB.ora initTESTDB_0.ora unlink configTESTDB.ora unlink initTESTDB.ora ln -s /apps/oracle8/app/admin/TESTDB/pfile/configTESTDB.ora configTESTDB.ora ln -s /apps/oracle8/app/admin/TESTDB/pfile/initTESTDB.ora initTESTDB.ora listener.ora,tnsnames.ora,sqlnet.ora alert_TESTDB.log crdbTESTDB.sql crdb2TESTDB.sql

3 n 2_1 /apps/oracle8/app/admin/TESTDB/create svrmgrl >connect internal >@crdbTESTDB.sql connect internal startup nomount pfile= /apps/oracle8/app/admin/TESTDB/pfile/initTESTDB_0.ora create database "TESTDB" maxinstances 8 maxlogfiles 32 character set "KO16KSC5601" maxdatafiles 50 datafile '/apps/DATABASE/SYSTEM.dbf'size 80M logfile group 1 ('/apps/DATABASE/REDO11.rdo', '/apps/DATABASE/REDO21.rdo')size 10M, group 2 ('/apps/DATABASE/REDO12.rdo', '/apps/DATABASE/REDO22.rdo')size 10M, group 3 ('/apps/DATABASE/REDO31.rdo', '/apps/DATABASE/REDO32.rdo')size 10M; disconnect /apps/oracle8/app/admin/TESTDB/create svrmgrl >connect internal >@crdb2TESTDB.sql connect internal ; disconnect connect internal @/apps/oracle8/app/product/8.1.6/rdbms/admin/catalog.sql connect internal create rollback segment r0 tablespace system storage (initial 16k next 16k minextents 2 maxextents 20); alter rollback segment r0 online; create tablespace rbs datafile '/apps/DATABASE/RBS.dbf'size 50M default storage ( initial 128k next 128k pctincrease 0 minextents 2 ); create tablespace temp datafile '/apps/DATABASE/TEMP.dbf'size 50M default storage ( initial 256k next 256k pctincrease 0 ); create tablespace tools datafile '/apps/DATABASE/TOOL.dbf'size 20m; create rollback segment r01 tablespace rbs; create rollback segment r02 tablespace rbs; alter rollback segment r01 online; alter rollback segment r0 offline; drop rollback segment r0; alter user sys temporary tablespace temp; alter user system default tablespace tools temporary tablespace temp; connect system/manager @/apps/oracle8/app/product/8.1.6/rdbms/admin/catdbsyn.sql connect sys/change_on_install @/apps/oracle8/app/product/8.1.6/rdbms/admin/catproc.sql @/apps/oracle8/app/product/8.1.6/rdbms/admin/catexp.sql 2. DataBase 2. DataBase

4 3. DB tablespace,user,rollback_segment,table 3. DB tablespace,user,rollback_segment,table 3_2 DB USER sqlplus system/manager create user jib_ssrt identified by jib_ssrt default tablespace MJHDATA01 temporary tablespace TEMP / grant dba to jib_ssrt / 3_1 DB tablespace create tablespace MJHDATA01 datafile '/apps/DATABASE/MJHDATA01_1.DBF' SIZE 5M / alter tablespace MJHDATA01 add datafile '/apps/DATABASE/MJHDATA01_2.DBF' size 5M / create tablespace MJHINDX01 datafile '/apps/DATABASE/MJHINDX01_1.IDX' SIZE 5M / alter tablespace MJHINDX01 add datafile '/apps/DATABASE/MJHINDX01_2.IDX' size 5M / 3_2 ROLLBACK_SEGMENT alter rollback segment r01 offline; drop rollback segment r01; create rollback segment r01 tablespace rbs01 storage( initial 5M next 5M minextents 2 maxextents unlimited ); alter rollback segment r11 online;

5 3_4 DB table,primary create table TBJHC24_01 ( RECV_NO VARCHAR2(7) not null, RECV_YYYY VARCHAR2(4) not null, BILL_SEQ_NO NUMBER(3) not null, SPEC_SEQ_NO VARCHAR2(7) not null, ARCD_SEQ_NO NUMBER(5) not null, ARCD_CONTN VARCHAR2(60) not null, constraint PK_TBJHC24_01 primary key (RECV_NO, RECV_YYYY, BILL_SEQ_NO, SPEC_SEQ_NO,ARCD_SEQ_NO) using index tablespace MJHINDX01 storage ( initial 2k next 2k pctincrease 0 maxextents 505 ) ) tablespace MJHDATA01 storage ( initial 2k next 2k pctincrease 0 maxextents 505 ) / comment on table TBJHC24_01 is ' ' / 3_5 DB fk alter table TBJHC22_01 drop constraint FK_TBJHC22_01_TBJHC201 / alter table TBJHC22_01 add constraint FK_TBJHC22_01_TBJHC201 foreign key (RECV_NO, RECV_YYYY, BILL_SEQ_NO, SPEC_SEQ_NO) references TBJHC20_01 (RECV_NO, RECV_YYYY, BILL_SEQ_NO, SPEC_SEQ_NO) on delete cascade /

6 3_6 DB grant grant all on WSUGAINF to public; 3_7 DB synonym sqlplus jib_ssrt/jib_ssrt drop synonym WRSUTD1T; create synonym WRSUTD1T for COMM1.WRSUTD1T@DL_EDI; 3_8 DB view drop view VWTBJHC1001 / create or replace view VWTBJHC1001 as select * from tbjhc10_01 union all select * from tbjhc10_02 union all select * from tbjhc10_03 union all select * from tbjhc10_04 / 3_9 DB index create index IX_TBJHC20_01_1 on TBJHC20_01(YKIHO asc) storage ( initial 1m next 1m pctincrease 0 maxextents 505) tablespace MJHINDX01 / 3_10 DB link drop public database link DL_EDI; create public database link DL_EDI connect to comm1 identified by comm1 using 'EDIDB';

7 4. Data insert 4. Data insert DB(10.7.1.6:TESTDB) DB(10.7.1.14:TESTDB) LINK INSERT 4_1. DB tnsnames.ora kkjiwon3 = (DESCRIPTION = (ADDRESS = (PROTOCOL= TCP)(Host= 10.7.1.13)(Port= 1526)) (CONNECT_DATA = (SID = TESTDB)) ) 4_2. DB LINK drop public database link dl_db00; create public database link dl_db00 connect to jib_ssrt identified by jib_ssrt using 'kkjiwon3'; 4_3. INSERT cd /apps/oracle8/app/tuning/s_insert.sql set heading off set feedback off set linesize 120 set pause off spool s_insert_all.sql select 'insert into ' ||table_name || ' select * from '||table_name || '@dl_db00 where recv_no = 7673670;' from user_tables; spool off; SQL>@s_insert_all

8 5. Data buffer Cache Shared Pool select, from ; Redo Log Buffer PMON SMONRECO CKPTDBWRLGWRARCH Data Files Online Redo log file User1 LISTENERDISPATCHER SharedDedicated SERVER User2 Offline Redo log File archive file SQL> select, from ; -------- ------------- 00000001.. Control File Data dictionary library cache DEDICATED METHOD MTS METHOD

9 kjibu02:/apps/oracle8/app> ps -ef|grep TEST oracle8 5758 1 0 12 08 ? 0:00 ora_d000_TESTDB oracle8 5752 1 0 12 08 ? 0:00 ora_s002_TESTDB oracle8 5746 1 0 12 08 ? 0:00 ora_reco_TESTDB oracle8 5756 1 0 12 08 ? 0:00 ora_s004_TESTDB oracle8 5736 1 0 12 08 ? 0:00 ora_pmon_TESTDB oracle8 5750 1 0 12 08 ? 0:00 ora_s001_TESTDB oracle8 5740 1 0 12 08 ? 0:03 ora_lgwr_TESTDB oracle8 5742 1 0 12 08 ? 0:00 ora_ckpt_TESTDB oracle8 5754 1 0 12 08 ? 0:00 ora_s003_TESTDB oracle8 5748 1 0 12 08 ? 0:00 ora_s000_TESTDB oracle8 5738 1 0 12 08 ? 0:01 ora_dbwr_TESTDB oracle8 5744 1 0 12 08 ? 0:00 ora_smon_TESTDB oracle8 5760 1 0 12 08 ? 0:00 ora_d001_TESTDB oracle8 5762 1 0 12 08 ? 0:00 ora_d002_TESTDB oracle8 5764 1 0 12 08 ? 0:00 ora_d003_TESTDB oracle8 5766 1 0 12 08 ? 0:00 ora_d004_TESTDB 6.UNIX process 7. initTESTDB.ora configTESTDB.ora ifile = /apps/oracle8/app/admin/TESTDB/pfile/configTESTDB.ora rollback_segments = (r01,r02) db_files = 70 db_file_multiblock_read_count = 32 db_block_buffers = 3200 shared_pool_size = 80480000 #log_archive_start = false # if you want automatic archiving #log_archive_dest = $ORACLE_HOME/arch #log_archive_format = _%s.ora mts_dispatchers="tcp,5" mts_max_dispatchers=10 mts_servers=5 mts_max_servers=10 mts_service=TESTDB mts_listener_address="(ADDRESS=(PROTOCOL=tcp)(HOST=kkjibu02)(PORT=1521))" control_files = (/apps/DATABASE/CONTROL1.ctl, /apps/DATABASE/CONTROL2.ctl, /apps/DATABASE/CONTROL3.ctl) background_dump_dest = /apps/oracle8/app/admin/TESTDB/bdump core_dump_dest = /apps/oracle8/app/admin/TESTDB/cdump user_dump_dest = /apps/oracle8/app/admin/TESTDB/udump #log_archive_dest = /apps/oracle/backup/olog #log_archive_format = %s.ARC db_block_size = 8192 db_name = TESTDB

10 8.archive mode 8_1. Archive mode 1 initTESTDB.ora log_archive_start = true # if you want automatic archiving log_archive_dest = $ORACLE_HOME/archive log_archive_format = _%s.ora 8_2. Archive mode 2 DB kkjibu02:/apps/oracle8/app> svrmgrl Oracle Server Manager Release 2.3.4.0.0 - Production Copyright (c) Oracle Corporation 1994, 1995. All rights reserved. Oracle7 Server Release 8.1.6.1.0 - Production With the distributed and parallel query options PL/SQL Release 2.3.4.1.0 - Production SVRMGR> connect internal Connected. SVRMGR> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SVRMGR> SVRMGR> startup mount ORACLE instance started. Total System Global Area 124754068 bytes Fixed Size 39816 bytes Variable Size 88259852 bytes Database Buffers 26214400 bytes Redo Buffers 10240000 bytes Database mounted. SVRMGR> alter database archivelog 2> / Statement processed. SVRMGR> alter database open 2> / Statement processed. SVRMGR> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /apps/oracle8/app/product/8.1.6/archive Oldest online log sequence 2 Next log sequence to archive 4 Current log sequence 4 SVRMGR> 9.v$log

11 10.backup DB COLD_BACKUP. backup.sql => sh backup.sh CONTROLFILE BACKUP alter database backup controlfile to trace; alter database backup controlfile to /apps/DATABASE/BACKUP/control.bak 11. log switch pl_insert.sql,log_switch.sql(alter system switch logfile;)

12 12.

13

14

15

16

17


Download ppt "Database Database 1. IP : X.X.X.X 2. Root : root / 3. Unix : oracle8 / XXXXXX 4. DB Version : 8.1.6 5. UNIX version : sun_solaris 2.6.1 6.SID : TESTDB."

Similar presentations


Ads by Google