■Delete a Database:
Linux上删除一个用DBCA创建的数据库(遵循OFA),主要删除3处:
1,/u01/oradata/ [instance file]
2,/u01/admin/ [instance file]
3,/u01/oracle/dbs/ 相关文件
■create a database (simple)
1,设置环境变量
创建个脚本文件BBK.env
$Vi BBK.env
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=bbk
ORACLE_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_NLS33 PATH LD_LIBRARY_PATH
$ls
$chmod + BBK.env
$. ./BBK.env
$env | grep ORA
4,Creating the initialization parameter File
pfile
$vi initbbk.ora
db_name ='bbk'
$
6,Connect to the instance
①authenticate with a password file
$sqlplus /nolog
SQL>CONNECT SYS AS SYSDBA
②authenticate with OS asuthentication
$sqlplus /nolog
SQL>CONNECT /AS SYSDBA
Connected to an idle instance
7, Create a Server Parameter file (可选recommended)
Spfile
$
SQL>CREATE SPFILE FROM PFILE
File created
SQL>!
8,Start the Instance
SQL>startup nomount
ORACLE instance started
SQL>!
$ps -ef | grep oracle
$ipcs
9,Issue the CREATE DATABASE Statement
SQL>create database bbk;
Database created.
■create a database (detail)
1、$strings spfileSID.ora > initbbk.ora
$vi initbbk.ora
:%s/wilsion/bbk/g
$cd /u01/oradata/
$ls
$mkdir bbk
$cd bbk
$mkdir archive
$
阅读(449) | 评论(0) | 转发(0) |