Create | scripts | data | database
all scripts for creating databases manually and their descriptions
All scripts and instructions for creating a database manually
System environment:
1, operating system: Windows Server, machine memory 128M
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3, Installation path: D:\ORACLE
Build the Library step:
1. Create related catalogue by hand
D:\Oracle\admin\test
D:\Oracle\admin\test\adhoc
D:\Oracle\admin\test\bdump
D:\Oracle\admin\test\cdump
D:\Oracle\admin\test\create
D:\Oracle\admin\test\exp
D:\Oracle\admin\test\pfile
D:\Oracle\admin\test\udump
5, through the Oradim.exe command, in the service to generate a new instance management services, the starting way for the manual
Set Oracle_sid=test
D:\Oracle\Ora81\bin\oradim-new-sid test-startmode manual-pfile "D:\Oracle\admin\test\pfile\inittest.ora"
6. Generate various database objects
D:\ >SVRMGRL
--Create a database
Connect internal/oracle
Startup Nomount pfile= "D:\Oracle\admin\test\pfile\inittest.ora"
CREATE DATABASE Test
LOGFILE ' D:\Oracle\oradata\test\redo01.log ' SIZE 2048K,
' D:\Oracle\oradata\test\redo02.log ' SIZE 2048K,
' D:\Oracle\oradata\test\redo03.log ' SIZE 2048K
Maxlogfiles 32
Maxlogmembers 2
Maxloghistory 1
DataFile ' D:\Oracle\oradata\test\system01.dbf ' SIZE 58M reuse autoextend on NEXT 640K
Maxdatafiles 254
Maxinstances 1
CHARACTER SET ZHS16GBK
National CHARACTER SET ZHS16GBK;
Control files, log files are generated when the above statement executes
Connect internal/oracle
--Modifying system table space
ALTER tablespace SYSTEM DEFAULT STORAGE (INITIAL 64K NEXT 64K minextents 1 maxextents Unlimited pctincrease 50);
ALTER tablespace SYSTEM MINIMUM EXTENT 64K;
--Create a rollback table space
CREATE tablespace RBS datafile ' D:\Oracle\oradata\test\rbs01.dbf ' SIZE 256M reuse
Autoextend on NEXT 5120K
MINIMUM EXTENT 512K
DEFAULT STORAGE (INITIAL 512K NEXT 512K minextents 8 maxextents 4096);
--Create a user table space
CREATE tablespace USERS datafile ' D:\Oracle\oradata\test\users01.dbf ' SIZE 128M reuse
Autoextend on NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE (INITIAL 128K NEXT 128K minextents 1 maxextents 4096 pctincrease 0);
--Create a temporary table space
CREATE tablespace TEMP datafile ' D:\Oracle\oradata\test\temp01.dbf ' SIZE 32M reuse
Autoextend on NEXT 640K
MINIMUM EXTENT 64K
DEFAULT STORAGE (INITIAL 64K NEXT 64K minextents 1 maxextents unlimited pctincrease 0) temporary;
--Create a tool table space
CREATE tablespace TOOLS datafile ' D:\Oracle\oradata\test\tools01.dbf ' SIZE 64M reuse
Autoextend on NEXT 320K
MINIMUM EXTENT 32K
DEFAULT STORAGE (INITIAL 32K NEXT 32K minextents 1 maxextents 4096 pctincrease 0);
--Create an index table space
CREATE tablespace INDX datafile ' D:\Oracle\oradata\test\indx01.dbf ' SIZE 32M reuse
Autoextend on NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE (INITIAL 128K NEXT 128K minextents 1 maxextents 4096 pctincrease 0);
--Create a rollback segment
CREATE public ROLLBACK SEGMENT RBS0 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS1 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS2 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS3 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS4 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS5 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS6 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS7 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS8 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS9 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS10 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS11 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS12 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS13 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS14 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS15 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS16 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS17 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS18 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS19 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS20 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS21 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS22 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS23 tablespace RBS STORAGE (OPTIMAL 4096K);
CREATE public ROLLBACK SEGMENT RBS24 tablespace RBS STORAGE (OPTIMAL 4096K);
--Make the rollback segment online
ALTER ROLLBACK SEGMENT "RBS0" ONLINE;
ALTER ROLLBACK SEGMENT "RBS1" ONLINE;
ALTER ROLLBACK SEGMENT "RBS2" ONLINE;
ALTER ROLLBACK SEGMENT "RBS3" ONLINE;
ALTER ROLLBACK SEGMENT "RBS4" ONLINE;
ALTER ROLLBACK SEGMENT "RBS5" ONLINE;
ALTER ROLLBACK SEGMENT "RBS6" ONLINE;
ALTER ROLLBACK SEGMENT "RBS7" ONLINE;
ALTER ROLLBACK SEGMENT "RBS8" ONLINE;
ALTER ROLLBACK SEGMENT "RBS9" ONLINE;
ALTER ROLLBACK SEGMENT "RBS10" ONLINE;
ALTER ROLLBACK SEGMENT "RBS11" ONLINE;
ALTER ROLLBACK SEGMENT "RBS12" ONLINE;
ALTER ROLLBACK SEGMENT "RBS13" ONLINE;
ALTER ROLLBACK SEGMENT "RBS14" ONLINE;
ALTER ROLLBACK SEGMENT "RBS15" ONLINE;
ALTER ROLLBACK SEGMENT "RBS16" ONLINE;
ALTER ROLLBACK SEGMENT "RBS17" ONLINE;
ALTER ROLLBACK SEGMENT "RBS18" ONLINE;
ALTER ROLLBACK SEGMENT "RBS19" ONLINE;
ALTER ROLLBACK SEGMENT "RBS20" ONLINE;
ALTER ROLLBACK SEGMENT "RBS21" ONLINE;
ALTER ROLLBACK SEGMENT "RBS22" ONLINE;
ALTER ROLLBACK SEGMENT "RBS23" ONLINE;
ALTER ROLLBACK SEGMENT "RBS24" ONLINE;
--Modifying the temp table space for the SYS user is temp
ALTER user sys temporary tablespace TEMP;
--Create a data dictionary table
@d:\oracle\ora81\rdbms\admin\catalog.sql;
@d:\oracle\ora81\rdbms\admin\catexp7.sql
@d:\oracle\ora81\rdbms\admin\catproc.sql
@d:\oracle\ora81\rdbms\admin\caths.sql
--Generate Sql*plus Help system
Sqlplus System/manager
@d:\oracle\ora81\sqlplus\admin\help\helpbld.sql Helpus.sql
Exit
--Modify System user default table space and temporary tablespace
Svrmgrl
Connect internal/oracle
Alter USER system default Tablespace TOOLS;
Alter user system temporary tablespace TEMP;
Exit
7. Set the test instance start service to Automatic startup mode
D:\Oracle\Ora81\bin\oradim-edit-sid Test-startmode Auto
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.