Linux 非图形界面安装Oracle数据库(2)

$ ls
                  clone.pl prepare_clone.pl
              $ perl clone.pl  ORACLE_SID= test ORACLE_BASE=/data/app/oracle ORACLE_HOME=/data/app/oracle/product/11.2.0.4/db_1/ ORACLE_HOME_NAME=OraDb11g_home1     

.......最后提示如下信息表示,克隆成功...


                    The following configuration scripts need to be executed as the "root" user.

/data/app/oracle/product/11.2.0.4/db_1/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

The cloning of OraDb11g_home1 was successful.
                              ...................

二、手动建库

1、配置参数文件 (测试环境简单参数,若有需求,可补充 )

[oracle@Database-backup dbs]$ cat inittest.ora 
        db_name=test
        db_files = 80
        db_file_multiblock_read_count = 8
        log_checkpoint_interval = 10000
        processes = 50
        parallel_max_servers = 5
        log_buffer = 32768
        max_dump_file_size = 10240    # limit trace file size to 5 Meg each
        global_names = TRUE
        #control_files = (ora_control1, ora_control2)
        sga_max_size=300M
        sga_target=300M
        *.local_listener='(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=10.240.1.7)(Port=1521)))'  #避免启动数据库时报错(ORA-00119、ORA-00130 local_listener配置无效)
        [oracle@Database-backup dbs]$

2、启动数据库到nomount 

SQL> startup nomount
          ORACLE instance started.

Total System Global Area  313159680 bytes
          Fixed Size              2252824 bytes
          Variable Size            104861672 bytes
          Database Buffers      201326592 bytes
          Redo Buffers              4718592 bytes
        SQL> 

3、创建数据库,到open状态
SQL>CREATE DATABASE test
      USER SYS IDENTIFIED BY change_on_install

USER SYSTEM IDENTIFIED BY manager

LOGFILE GROUP 1 ( '/data/app/dbf/redo01.log') SIZE 100M,

GROUP 2 ('/data/app/dbf/redo02.log') SIZE 100 M,

GROUP 3 ('/data/app/dbf/redo03.log') SIZE 100 M

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

CHARACTER SET GBK

NATIONAL CHARACTER SET AL16UTF16

DATAFILE '/data/app/dbf/system01.dbf' SIZE 325M REUSE

EXTENT MANAGEMENT LOCAL

SYSAUX DATAFILE '/data/app/dbf/sysaux01.dbf' SIZE 325 M REUSE

DEFAULT TABLESPACE users datafile '/data/app/dbf/users.dbf' size 50m

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE '/data/app/dbf/temp01.dbf'

SIZE 20 M REUSE

UNDO TABLESPACE undotbs

DATAFILE '/data/app/dbf/undotbs01.dbf'

SIZE 200 M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; 

Database created.

SQL> 

4、确认数据库状态

SQL> select status from v$instance;

STATUS
        ------------
        OPEN

SQL> 

5、 将DBF 设置自动扩展,避免稍后执行脚本加载数据字典表/包/scott用户 时空间不足

alter database datafile 1 autoextend on;
          alter database datafile 2 autoextend on;
          alter database datafile 3 autoextend on;
          alter database datafile 4 autoextend on;

6、创建数据字典/包/scott用户

数据字典视图      : @?/rdbms/admin/catalog.sql

系统包/存储过程 : @?/rdbms/admin/catproc.sql

用户PROFILE表  : @?/rdbms/admin/pupbld.sql

测试用户scott    :@?/rdbms/admin/scott.sql

以上已完成安装oracle软件及数据库。

问题整理和完善

1、***** sqlplus / as sysdba 提示未找到libclntsh.so.11.1文件

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/bf6cba972cceb9dd5b589ed8dd397c0a.html