在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1.通过运行Oracle Database Configuration Assistant 创建、配置、或删除数据库(也可在命令行下输入dbca); 详述: 2.用命令行的方式建立数据库 复制代码 代码如下: CONNECT / AS SYSDBA STARTUP PFILE= 'C:oracleadmininit_testorcl.ora' NOMOUNT; CREATE DATABASE testOrcl DATAFILE '/u02/oracle/testOrcl/system01.dbf' SIZE 100M LOGFILE GROUP1 ('/u01/oracle/testOrcl/redo1a.log', '/u02/oracle/testOrcl/redo1b.log') SIZE 500K, GROUP2 ('/u01/oracle/testOrcl/redo1a.log', '/u02/oracle/testOrcl/redo1b.log') SIZE 500K CHARACTER SET ZHS16CGB231280; --将数据库直接从未建置状态转换到打开状态 --删除数据库(Dropping a Database) 优点:可以熟悉创建指令,创建原理; 缺点:配置简单,要求熟记命令行指令; 3.通过运行自定义的批处理或SQL脚本(create_ORACLE_SID.bat或create_ORACLE_SID.sql)来创建 复制代码 代码如下: --create_ORACLE_SID.bat set ORACLE_SID= ORACLE_SID. del C:ORACLE8IdatabasepwdORACLE_SID.ora C:ORACLE8Ibinoradim -new -sid ORACLE_SID. -intpwd oracle -startmode manual -pfile C:ORACLE8IadminORACLE_SIDpfileinit.ora C:ORACLE8Ibinsvrmgrl @C:WINNTProfilesAdministratorLbORACLE_SIDrun.sql C:ORACLE8Ibinsvrmgrl @C:WINNTProfilesAdministratorLbORACLE_SIDrun1.sql C:ORACLE8Ibinoradim -edit -sid ORACLE_SID -startmode auto --ORACLE_SIDrun.sql spool C:ORACLE8IadminORACLE_SIDcreatecreatedb set echo on connect INTERNAL/oracle startup nomount pfile=C:ORACLE8IadminORACLE_SIDpfileinit.ora CREATE DATABASE ORACLE_SID LOGFILE 'C:ORACLE8IoradataORACLE_SIDredo01.log' SIZE 1024K, 'C:ORACLE8IoradataORACLE_SIDredo02.log' SIZE 1024K MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXLOGHISTORY 1 DATAFILE 'C:ORACLE8IoradataORACLE_SIDsystem01.dbf' SIZE 50M REUSE MAXDATAFILES 254 MAXINSTANCES 1 CHARACTER SET ZHT16BIG5 NATIONAL CHARACTER SET ZHT16BIG5; spool off --ORACLE_SIDrun1.sql spool C:ORACLE8IadminORACLE_SIDcreatecreatedb1 set echo on connect INTERNAL/oracle ALTER DATABASE DATAFILE 'C:ORACLE8IoradataORACLE_SIDsystem01.dbf' AUTOEXTEND ON; CREATE ROLLBACK SEGMENT SYSROL TABLESPACE "SYSTEM" STORAGE (INITIAL 100K NEXT 100K); ALTER ROLLBACK SEGMENT "SYSROL" ONLINE; Linux平台下Oracle的操作 下面对Oracle的操作都是在Linux平台下进行的! 启动Oracle 9i 数据库 启动Oracle 9i监听程序 关闭Oracle 9i监听程序 启动步骤: 关闭步骤: |
请发表评论