Linux平臺下Oracle 10.2.0.1 手工建立資料庫過程
Linux平臺下Oracle 10.2.0.1 手工建立資料庫
在原有資料庫基礎上建立另一個db
1.oracle使用者登入OS
[oracle@localhost admin]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
2.進入oracle_base目錄
[oracle@localhost admin]$ cd $ORACLE_BASE
進入admin目錄
[oracle@localhost ~]$ cd admin/
檢視當前已有的目錄
[oracle@localhost admin]$ ls -ltrh
total 4.0K
drwxr-x--- 8 oracle oinstall 4.0K Apr 11 2012 orcl
total 4.0K
drwxr-x--- 8 oracle oinstall 4.0K Apr 11 2012 orcl
檢視當前資料庫orcl目錄層次結構,有幾種dump
[oracle@localhost admin]$ ls -ltrh orcl/
total 356K
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 dpdump
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 cdump
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 pfile
drwxr-x--- 2 oracle oinstall 20K Jan 24 16:42 udump
drwxr-x--- 2 oracle oinstall 12K Jan 24 16:42 bdump
drwxr-x--- 2 oracle oinstall 308K Jan 25 15:32 adump
total 356K
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 dpdump
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 cdump
drwxr-x--- 2 oracle oinstall 4.0K Apr 11 2012 pfile
drwxr-x--- 2 oracle oinstall 20K Jan 24 16:42 udump
drwxr-x--- 2 oracle oinstall 12K Jan 24 16:42 bdump
drwxr-x--- 2 oracle oinstall 308K Jan 25 15:32 adump
3.建立相關dump目錄
[oracle@localhost admin]$ mkdir -p test/adump
[oracle@localhost admin]$ mkdir -p test/bdump
[oracle@localhost admin]$ mkdir -p test/cdump
[oracle@localhost admin]$ mkdir -p test/dpdump
[oracle@localhost admin]$ mkdir -p test/udump
[oracle@localhost admin]$ mkdir -p test/bdump
[oracle@localhost admin]$ mkdir -p test/cdump
[oracle@localhost admin]$ mkdir -p test/dpdump
[oracle@localhost admin]$ mkdir -p test/udump
4.進入通常存放資料庫檔案的目錄oradata
[oracle@localhost admin]$ cd $ORACLE_BASE/oradata
5.建立目錄
[oracle@localhost oradata]$ mkdir test
[oracle@localhost oradata]$ ls -ltrh
total 8.0K
drwxr-x--- 4 oracle oinstall 4.0K Jan 16 01:30 orcl
drwxr-xr-x 2 oracle oinstall 4.0K Jan 25 16:31 test
total 8.0K
drwxr-x--- 4 oracle oinstall 4.0K Jan 16 01:30 orcl
drwxr-xr-x 2 oracle oinstall 4.0K Jan 25 16:31 test
6.進入dbs目錄
[oracle@localhost db_1]$ cd $ORACLE_HOME/dbs
[oracle@localhost db_1]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ pwd
/home/oracle/product/10.2.0/db_1/dbs
/home/oracle/product/10.2.0/db_1/dbs
7.利用已有資料庫orcl初始化引數檔案,生成新建db的初始化引數檔案
將orcl批量替換成test
[oracle@localhost dbs]$ vi initorcl.ora
......
:%s/orcl/test/g
......
:%s/orcl/test/g
8.建立新建資料庫test的密碼檔案
[oracle@localhost dbs]$ orapwd file=orapwtest password=oracle entries=5
[oracle@localhost dbs]$ ls -ltrh orapwtest
-rw-r----- 1 oracle oinstall 2.0K Jan 25 17:08 orapwtest
-rw-r----- 1 oracle oinstall 2.0K Jan 25 17:08 orapwtest
9.設定環境變數oracle_sid
[oracle@localhost dbs]$ export ORACLE_SID=test
10.sqlplus登入
[oracle@localhost dbs]$ sqlplus /nolog
[oracle@localhost dbs]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 25 16:37:21 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
ORACLE instance started.
Total System Global Area 1895825408 bytes
Fixed Size 1220072 bytes
Variable Size 687866392 bytes
Database Buffers 1191182336 bytes
Redo Buffers 15556608 bytes
Fixed Size 1220072 bytes
Variable Size 687866392 bytes
Database Buffers 1191182336 bytes
Redo Buffers 15556608 bytes
11.執行建立資料庫test
SQL> create database test
2 datafile '/home/oracle/oradata/test/system01.dbf' size 300M reuse autoextend on next 10240K maxsize unlimited extent management local
3 sysaux datafile '/home/oracle/oradata/test/sysaux01.dbf' size 120M reuse autoextend on next 10240K maxsize unlimited
4 default temporary tablespace temp tempfile '/home/oracle/oradata/test/temp01.dbf' size 200M reuse autoextend on next 640K maxsize unlimited
5 undo tablespace "UNDOTBS1" datafile '/home/oracle/oradata/test/undotbs01.dbf' size 500M reuse autoextend on next 5120K maxsize unlimited
6 logfile group 1 ('/home/oracle/oradata/test/redo01.log') size 100m,
7 group 2 ('/home/oracle/oradata/test/redo02.log') size 100m,
8 group 3 ('/home/oracle/oradata/test/redo03.log') size 100m
9 character set ZHS16GBK national character set UTF8;
Database created.
2 datafile '/home/oracle/oradata/test/system01.dbf' size 300M reuse autoextend on next 10240K maxsize unlimited extent management local
3 sysaux datafile '/home/oracle/oradata/test/sysaux01.dbf' size 120M reuse autoextend on next 10240K maxsize unlimited
4 default temporary tablespace temp tempfile '/home/oracle/oradata/test/temp01.dbf' size 200M reuse autoextend on next 640K maxsize unlimited
5 undo tablespace "UNDOTBS1" datafile '/home/oracle/oradata/test/undotbs01.dbf' size 500M reuse autoextend on next 5120K maxsize unlimited
6 logfile group 1 ('/home/oracle/oradata/test/redo01.log') size 100m,
7 group 2 ('/home/oracle/oradata/test/redo02.log') size 100m,
8 group 3 ('/home/oracle/oradata/test/redo03.log') size 100m
9 character set ZHS16GBK national character set UTF8;
Database created.
12.執行catalog,建立系統基表及相關檢視等
SQL> @?/rdbms/admin/catalog.sql
......
......
13.執行catproc,建立系統相關package等物件
SQL> @?/rdbms/admin/catproc.sql
......
......
生成spfile
SQL> create spfile from pfile;
File created.
14.system使用者登入
SQL> connect system/manager
Connected.
Connected.
15執行pupbld.sql
SQL> @?/sqlplus/admin/pupbld.sql
......
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-753429/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 手工建立oracle資料庫的過程Oracle資料庫
- Oracle 手工建立資料庫Oracle資料庫
- 手工建立oracle資料庫Oracle資料庫
- 手工建立oracle資料庫(轉)Oracle資料庫
- 【原創】手工建立Oracle資料庫Oracle資料庫
- Oracle XE的資料庫建立過程Oracle資料庫
- 【手工建庫】手工方式建立 ORACLE資料庫全程記錄Oracle資料庫
- 手工建立資料庫資料庫
- Oracle11g 手工建立資料庫Oracle資料庫
- 手工建立ORACLE 11g 資料庫Oracle資料庫
- oracle10g手工建立資料庫Oracle資料庫
- Oracle 10g手工建立資料庫Oracle 10g資料庫
- windows平臺下Oracle10.2 RMAN資料庫遷移至Linux平臺下WindowsOracle資料庫Linux
- 在LINUX平臺上手動建立資料庫(oracle 10g)Linux資料庫Oracle 10g
- Oracle 中手工建立資料庫的語法Oracle資料庫
- 手工命令建立資料庫資料庫
- linux平臺下oracle從10.2.0.1升級到10.2.0.4LinuxOracle
- linux下Postgresql-9.2安裝及資料庫的建立過程LinuxSQL資料庫
- Oracle學習系列—Window作業系統下Oracle資料庫的手工建立Oracle作業系統資料庫
- Linux x86平臺下Oracle 10.2.0.1 ORA-27094LinuxOracle
- 手動建立資料庫過程資料庫
- standby 資料庫的建立過程資料庫
- Oracle學習系列—Window作業系統下Oracle資料庫的手工建立(zt)Oracle作業系統資料庫
- 手工建立(Create)一個Oracle 10g資料庫Oracle 10g資料庫
- 手工建立oracle示例資料庫schema (Database Examples 安裝)Oracle資料庫Database
- oracle xe 10g 手工建立資料庫 for windows XPOracle資料庫Windows
- 手工建庫完成過程
- 4, 手工建立資料庫(筆記)資料庫筆記
- Standby資料庫簡單建立過程資料庫
- rman將linux平臺資料庫遷移到window平臺資料庫Linux資料庫
- Oracle資料庫啟動過程Oracle資料庫
- 手工刪除oracle資料庫Oracle資料庫
- 2.4.10 Step 9:手工建立資料庫資料庫
- 手工建立資料庫的完整步驟資料庫
- Linux平臺下MySQL資料庫定時備份LinuxMySql資料庫
- window平臺下手動建立資料庫演示資料庫
- Linux平臺上手動解除安裝Oracle資料庫LinuxOracle資料庫
- oracle資料庫的關閉過程Oracle資料庫