zoukankan      html  css  js  c++  java
  • 11204RAC-dbca建库脚本

    SET VERIFY OFF
    connect "SYS"/"&&sysPassword" as SYSDBA
    set echo on
    spool /u01/app/oracle/admin/qpdb/scripts/postDBCreation.log append
    @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundleapply.sql;
    select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual;
    execute utl_recomp.recomp_serial();
    select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual;
    execute dbms_swrf_internal.cleanup_database(cleanup_local => FALSE);
    commit;
    shutdown immediate;
    connect "SYS"/"&&sysPassword" as SYSDBA
    startup mount pfile="/u01/app/oracle/admin/qpdb/scripts/init.ora";
    alter database archivelog;
    alter database open;
    select group# from v$log where group# =5;
    select group# from v$log where group# =6;
    ALTER DATABASE ADD LOGFILE THREAD 3 GROUP 5  SIZE 51200K,
     GROUP 6  SIZE 51200K;
    ALTER DATABASE ENABLE PUBLIC THREAD 3;
    select group# from v$log where group# =3;
    select group# from v$log where group# =4;
    ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 3  SIZE 51200K,
     GROUP 4  SIZE 51200K;
    ALTER DATABASE ENABLE PUBLIC THREAD 2;
    host echo cluster_database=true >>/u01/app/oracle/admin/qpdb/scripts/init.ora;
    host echo remote_listener=qpdb-cluster-scan:1521>>/u01/app/oracle/admin/qpdb/scripts/init.ora;
    connect "SYS"/"&&sysPassword" as SYSDBA
    set echo on
    create spfile='+DATA/qpdb/spfileqpdb.ora' FROM pfile='/u01/app/oracle/admin/qpdb/scripts/init.ora';
    shutdown immediate;
    host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl enable database -d qpdb;
    host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl start database -d qpdb;
    connect "SYS"/"&&sysPassword" as SYSDBA
    spool off

  • 相关阅读:
    常用函数
    PostgreSql那点事(文件读取写入、命令执行的办法)
    如何检测Windows中的横向渗透攻击
    小米笔记本pro版bios经常找不到硬盘
    grunt教程
    nodejs廖雪峰大神教程
    ClickOnce是什么?如何使用?
    asp.net中的ORA-12154: TNS: 无法解析指定的连接标识符
    未能加载文件或程序集 ICSharpCode.SharpZipLib
    PL/SQL 循环
  • 原文地址:https://www.cnblogs.com/iyoume2008/p/9809597.html
Copyright © 2011-2022 走看看