詳述
建議不熟悉創建過程的DBA使用該方法
優點
缺點
CONNECT / AS SYSDBA
STARTUP PFILE=
CREATE DATABASE testOrcl DATAFILE
LOGFILE GROUP
GROUP
CHARACTER SET ZHS
ALTER DATABASE OPEN;
SPOOL C:DROP_DATABASE
SELECT
SELECT
SPOOL OFF;
優點
缺點
set ORACLE_SID= ORACLE_SID
del C:ORACLE
C:ORACLE
C:ORACLE
C:ORACLE
C:ORACLE
spool C:ORACLE
set echo on
connect INTERNAL/oracle
startup nomount pfile=C:ORACLE
CREATE DATABASE ORACLE_SID
LOGFILE
MAXLOGFILES
MAXLOGMEMBERS
MAXLOGHISTORY
DATAFILE
MAXDATAFILES
MAXINSTANCES
CHARACTER SET ZHT
NATIONAL CHARACTER SET ZHT
spool off
spool C:ORACLE
set echo on
connect INTERNAL/oracle
ALTER DATABASE DATAFILE
CREATE ROLLBACK SEGMENT SYSROL TABLESPACE "SYSTEM" STORAGE (INITIAL
ALTER ROLLBACK SEGMENT "SYSROL" ONLINE;
Linux平台下Oracle的操作
下面對Oracle的操作都是在Linux平台下進行的!
首選啟動數據庫
su
sqlplus /nolog
conn /as sysdba
startup
然後啟動監聽:
進入/opt/Oracle/product/
lsnrctl start
運行shudown命令關閉數據庫
[Oracle@wing /Oracle]$ sqlplus" / as sysdba" //以sysdba用戶登陸數據庫
SQL> shutdown
啟動Oracle
[Oracle@wing bin]$ sqlplus " /as sysdba"
SQL> startup
啟動Oracle
Oracle的監聽程序主要是為客戶端的連接提供接口
[Oracle@wing bin]$ lsnrctl
LSNRCTL> start
關閉Oracle
[Oracle@wing bin]$ lsnrctl
LSNRCTL> stop
先看看Oracle_SID 環境變量設置是否正確
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
$ lsnrctl start
$ svrmgrl
SVRMGR> connect internal
SVRMGR> startup
$ lsnrctl start
在哪裡報錯??
一般只要設置這
/etc/oratab
ora
/etc/inittab
oralce:
Oracle:
啟動步驟
su
[Oracle@websvr
SQL> connect / as sysdba
SQL> startup
SQL> quit
[Oracle@websvr
可用 [Oracle@websvr
關閉步驟
su
[Oracle@websvr
[Oracle@websvr
SQL> connect / as sysdba
SQL> shutdown immediate
SQL> quit
From:http://tw.wingwit.com/Article/program/Oracle/201311/19064.html