zoukankan      html  css  js  c++  java
  • Oracle数据库修改DBID和DBNAME

    1.受影响文件统计

    文件 关联参数 NID是否处理
    Password File DBNAME
    Parameter File DBNAME
    Data File DBNAME,DBID
    Online Redo Log DBID
    Archived Redo Log DBID
    Backup Set DBID
    Control File DBID,DBNAME
    Oracle NET File(Listener,tnsnames) DBNAME
    DBConsole DBID,DBNAME

    2.查看数据库信息

    select dbid,name from v$database;
    archive log list;
    -- 生成最新的pfile
    create pfile from spfile;
    

    3.关闭数据库

    shutdown immediate;
    startup mount;
    

    4.修改

    nid -help
    nid target=/ dbname=sailydb
    

    5.修改参数文件

    startup nomount;
    alter system set db_name='sailydb' scope=spfile;
    shutdown immediate;
    cd $ORACLE_HOME/dbs
    mv spfilemonkeydb.ora spfilesailydb.ora
    

    6.生成密码文件

    cd $ORACLE_HOME/dbs
    orapwd file=orapwsailydb password=monkey
    

    7.修改环境变量

    vi .bash_profile
    ORACLE_SID=sailydb
    source .bash_profile
    

    8.修改监听

    cd $ORACLE_HOME/network/admin
    vi listener.ora
    

    9.开启数据库

    startup mount;
    alter database open resetlogs;
    lsnrctl stop
    lsnrctl start
    

    10.生成EM

  • 相关阅读:
    volley框架使用
    Insert Interval
    candy(贪心)
    Best Time to Buy and Sell Stock
    Best Time to Buy and Sell Stock III
    distinct subsequences
    edit distance(编辑距离,两个字符串之间相似性的问题)
    trapping rain water
    word break II(单词切分)
    sudoku solver(数独)
  • 原文地址:https://www.cnblogs.com/monkey6/p/15606738.html
Copyright © 2011-2022 走看看