Oracle手工建庫筆記

來源:互聯網
上載者:User

把Oracle庫刪了先~~

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter system enable restricted session;

SQL> drop database;

開始Oracle手工建庫

vi .bash_profile

source .bash_profile(它比較二,改完不會立即生效,所以重新載入一下......)

vi $ORACLE_HOME/dbs/init$ORACLE_SID.ora (建立初始設定檔案)

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=123456 force=y(建立密碼檔案)

建立spfile

SQL> startup nomount

SQL> create spfile from pfile;

vi /home/oracle/createDB.sql(建立資料庫)

SQL> @/home/oracle/createDB.sql

SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql(建資料字典視圖)

SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql(建預存程序包)

大功告成!

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.