Manually recreate the 8i database

Source: Internet
Author: User
Tags character set log connect rollback create database
Create | data | database
Manually recreate the 8i database
Author: Llmmysun

1. View the original database file, save its location and size

SYSTEM
/HOME/ORA817/ORADATA/CLUBCORE/SYSTEM01.DBF 800M

TOOLS
/HOME/ORA817/ORADATA/CLUBCORE/TOOLS01.DBF 250M

Rbs
/HOME/ORA817/ORADATA/CLUBCORE/RBS01.DBF 1024M

TEMP
/HOME/ORA817/ORADATA/CLUBCORE/TEMP01.DBF 2048

USERS
/HOME2/ORA817/ORADATA/CLUBCORE/USERS01.DBF 2048

INDX
/HOME3/ORA817/ORADATA/CLUBCORE/INDX01.DBF 2048

Club_core
/HOME2/ORA817/ORADATA/CLUBCORE/CLUB_CORE01.DBF 2048

--Query The original user name, and export the original user data

--2. Querying database Sid
Oracle_sid=clubcore

--3. Determine the original table space name and size
Tablespace USED MB
------------------------------------------------------------ ----------
Free MB Total
---------- ----------
Club_core 0
2048 2048

INDX 0
2048 2048

RBS 116
908 1024


Tablespace USED MB
------------------------------------------------------------ ----------
Free MB Total
---------- ----------
SYSTEM 90
710 800

TEMP 0
2048 2048

TOOLS 0
250 250


Tablespace USED MB
------------------------------------------------------------ ----------
Free MB Total
---------- ----------
USERS 2
2046 2048


7 rows selected.

--4. Determine the location of the redo log file
group# STATUS
---------- --------------
Member
--------------------------------------------------------------------------------
1
/home3/ora817/oradata/redo0101.log

1
/home4/ora817/oradata/redo0102.log

2
/home3/ora817/oradata/redo0201.log


group# STATUS
---------- --------------
Member
--------------------------------------------------------------------------------
2
/home4/ora817/oradata/redo0202.log

3
/home3/ora817/oradata/redo0301.log

3
/home4/ora817/oradata/redo0302.log


6 rows selected.

--Create key file Orapwd file=orapwsid password=*** entries=5

--Execute CREATE DATABASE script

CREATE DATABASE Clubcore
Maxinstances 1
Maxloghistory 1
Maxlogfiles 7
Maxlogmembers 3
Maxdatafiles 100
DataFile '/home/ora817/oradata/clubcore/system01.dbf ' SIZE 800M reuse autoextend on NEXT 10240K MAXSIZE Unlimited
CHARACTER SET ZHS16GBK
National CHARACTER SET ZHS16GBK
LOGFILE GROUP 1 ('/home3/ora817/oradata/redo0101.log ', '/home4/ora817/oradata/redo0102.log ') SIZE 40960K,
GROUP 2 ('/home3/ora817/oradata/redo0201.log ', '/home4/ora817/oradata/redo0202.log ') SIZE 40960K,
GROUP 3 ('/home3/ora817/oradata/redo0301.log ', '/home4/ora817/oradata/redo0302.log ') SIZE 40960K;

--Create a data file
CREATE tablespace "INDX" LOGGING datafile '/home3/ora817/oradata/clubcore/indx01.dbf ' SIZE 2048M reuse autoextend on NEXT 1280K MAXSIZE Unlimited;
CREATE tablespace "USERS" LOGGING datafile '/home2/ora817/oradata/clubcore/users01.dbf ' SIZE 2048M reuse autoextend on NE XT 1280K MAXSIZE Unlimited;
CREATE tablespace "TOOLS" LOGGING datafile '/home/ora817/oradata/clubcore/tools01.dbf ' SIZE 250M reuse autoextend on NEXT 320K MAXSIZE Unlimited;
CREATE tablespace "Club_core" LOGGING datafile '/home2/ora817/oradata/clubcore/club_core01.dbf ' SIZE 2048M reuse Autoextend on NEXT 1280K MAXSIZE Unlimited;
CREATE tablespace "RBS" LOGGING datafile '/home/ora817/oradata/clubcore/rbs01.dbf ' SIZE 1024M reuse autoextend on NEXT 12 80K MAXSIZE Unlimited;
Create temporary tablespace TEMP tempfile '/home/ora817/oradata/clubcore/temp01.dbf ' size 2048M;

--Create a rollback segment
Create public rollback segment RB1 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);
Create public rollback segment RB2 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);
Create public rollback segment RB3 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);
Create public rollback segment RB4 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);
Create public rollback segment RB5 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);
Create public rollback segment Rb6 tablespace RBS storage (initial 100K next 100K minextents-maxextents 50 M);

--Create the appropriate database package
Connect Sys/change_on_install as SYSDBA
@?/rdbms/admin/catalog.sql;
@?/rdbms/admin/catproc.sql;
Connect System/manager
@?/sqlplus/admin/pupbld.sql;

Finish



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.