ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 命令行建库Oracle11.2.0.1 for RHEL5 x86_64

命令行建库Oracle11.2.0.1 for RHEL5 x86_64

原创 Linux操作系统 作者:cow977 时间:2011-12-20 07:39:13 0 删除 编辑

参考:http://yangtingkun.itpub.net/post/468/514506

 

测试一下dbcasilent建库。不用GUI,直接通过命令行来建库,对远程维护ORACLE数据库也会有用处的,特别是一些要通过中间跳转的Oracle数据库服务器的维护。

下面开始,先编辑responseFile文件Demo.create.txt如下:

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "DEMODB"

SID = "demodb"

TEMPLATENAME = "New_Database.dbt"

SYSPASSWORD = "demodb"

SYSTEMPASSWORD = "demodb"

SYSMANPASSWORD = "demodb"

DBSNMPPASSWORD = "demodb"

DATAFILEDESTINATION ="/home/oracle/oradata"

STORAGETYPE=FS

CHARACTERSET = "ZHS16GBK"

DATABASETYPE = "MULTIPURPOSE"

AUTOMATICMEMORYMANAGEMENT = "FALSE"

然后利用silent模式创建数据库:

[oracle@Oracle111 ~]$ dbca -silent -responseFile Demo.create.txt

Creating and starting Oracle instance

1% complete

3% complete

Creating database files

4% complete

7% complete

Creating data dictionary views

8% complete

9% complete

10% complete

11% complete

12% complete

13% complete

14% complete

16% complete

17% complete

18% complete

19% complete

Adding Oracle JVM

25% complete

30% complete

36% complete

38% complete

Adding Oracle Text

40% complete

41% complete

Adding Oracle XML DB

43% complete

44% complete

45% complete

46% complete

47% complete

48% complete

49% complete

Adding Oracle Multimedia

50% complete

51% complete

60% complete

Adding Oracle OLAP

61% complete

62% complete

63% complete

64% complete

Adding Oracle Spatial

65% complete

66% complete

67% complete

71% complete

Adding Enterprise Manager Repository

73% complete

75% complete

Adding Oracle Application Express

78% complete

82% complete

Adding Oracle Warehouse Builder

86% complete

90% complete

Completing Database Creation

91% complete

92% complete

93% complete

96% complete

100% complete

Look at the log file "/home/oracle/cfgtoollogs/dbca/DEMODB/DEMODB.log" for further details.

安装过程一切顺利,检查数据库安装情况:

[oracle@rhel5 ~]$ export ORACLE_SID=demodb

[oracle@rhel5 ~]$ sqlplus /nolog

 

SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 27 15:03:51 2011

 

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

 

SQL> conn / as sysdba

Connected.

SQL> select * from v$instance;

 

INSTANCE_NUMBER INSTANCE_NAME

--------------- ----------------

HOST_NAME

----------------------------------------------------------------

VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT

----------------- --------- ------------ --- ---------- ------- ---------------

LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO

---------- --- ----------------- ------------------ --------- ---

              1 demodb

rhel5

11.2.0.1.0        27-DEC-11 OPEN         NO           1 STOPPED

ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO

 

SQL> select * from v$version;

 

BANNER

------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

PL/SQL Release 11.2.0.1.0 - Production

CORE    11.2.0.1.0      Production

TNS for Linux: Version 11.2.0.1.0 - Production

NLSRTL Version 11.2.0.1.0 – Production

 

SQL> select name, open_mode from v$database;

 

NAME      OPEN_MODE

--------- --------------------

DEMODB    READ WRITE

 

 

[oracle@rhel5 ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-DEC-2011 15:20:28

 

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel5)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                08-DEC-2011 16:38:28

Uptime                    18 days 22 hr. 42 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /home/oracle/product/11.2/db_1/network/admin/listener.ora

Listener Log File         /home/oracle/diag/tnslsnr/rhel5/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel5)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "demodb" has 1 instance(s).

  Instance "demodb", status READY, has 1 handler(s) for this service...

Service "demodbXDB" has 1 instance(s).

  Instance "demodb", status READY, has 1 handler(s) for this service...

The command completed successfully

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/81227/viewspace-714042/,如需转载,请注明出处,否则将追究法律责任。

上一篇: SQL Server集群
请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    629
  • 访问量
    691696