Hi all this is first post in my web blog , I'm database consult (oracle & mysql) , I would like to share some tip , technique and new technology of oracle and mysql to helping people be successful to , from first topic we'll going to how to change oracle database name as
here is step by step :
1. Backup the database first ( via alter tablespace begin backup , rman or some backup tools) (the process of backup that beyond scope of my topic.)
2. Logon to database and shutdown :
$ sqlplus /nolog
SQL> conn / as sysdba
SQL> select count(1) from v$transaction
or in RAC used gv$transaction instead.
SQL> shutdown immediate;
SQL> startup mount;
3. Call DBNEWID utility with sysdba
$ nide target=sys/password dbname=new_name setname=yes
4. Shutdown database
5. Change New name :
$ sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount;
SQL> alter system set db_name=new_name scope=spfile;
SQL> shutdown immediate;
6. Create new password file
$ orapwd file=$ORACLE_HOME/dbs/pwdnew_name.ora password=password entries=5
7. Reset ORACLE_SID environment in .profile (aix,solaris) or .bash_profile(linux)
Change to
ORACLE_SID=new_name;export ORACLE_SID
or in the shell terminal try
export ORACLE_SID=new_name
8. Alter listener.ora and tnsname.ora settings to match the new database and restart listener by:
$ lsnrctl reload
9. Startup (no resetlog require for change database name only)
$ sqlplus /nolog
SQL> conn / as sysdba
SQL> startup
ไม่มีความคิดเห็น:
แสดงความคิดเห็น