0% found this document useful (0 votes)
314 views

How To Change The Database Name in Applications (EBS)

The document provides steps to change the database name in Oracle applications: 1. Backup the existing control file and shutdown the database. 2. Modify configuration files like init files and listener files to reference the new database name. 3. Relink executables, recreate control files, and rename directories to reflect the new database name before opening the database with the new name.

Uploaded by

amitahlawat2006
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views

How To Change The Database Name in Applications (EBS)

The document provides steps to change the database name in Oracle applications: 1. Backup the existing control file and shutdown the database. 2. Modify configuration files like init files and listener files to reference the new database name. 3. Relink executables, recreate control files, and rename directories to reflect the new database name before opening the database with the new name.

Uploaded by

amitahlawat2006
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 5

How to Change the Database Name in Applications (EBS)

 
1. To get the db Name and SID - 
 
 
SQL> SELECT NAME FROM V$DATABASE; 
SQL> SELECT INSTANCE FROM V$THREAD; 
 
 
2. Force a checkpoint 
SQL> alter system switch logfile; 
 
 
3. Backup controlfile to trace. 
 
 
SQL> conn /as sysdba 
Connected. 
SQL> alter database backup controlfile to trace resetlogs; 
 
 
Database altered. 
 
 
SQL> exit 
 
 
[oracle@app2 9.2.0]$ cd $ORACLE_HOME/admin/PROD_app2/udump/ 
[oracle@app2 udump]$ ls -lrt 
 
 
3. Shutdown immediate/normal. Must not be shutdown abnormally using SHUTDOWN ABORT. 
SQL> shutdown immediate 
[oracle@app2 u02]$ lsnrctl stop PROD 
 
 
4. Change the dbName etc in ctrl file trace and save as .sql file (Change REUSE ---> SET) 
********************************************************************************** 
*** In the sql file, *** 
*** Update the following line - *** 
*** CREATE CONTROLFILE REUSE DATABASE \"PROD\" RESETLOGS NOARCHIVELOG
*** 
*** to *** 
*** CREATE CONTROLFILE REUSE SET DATABASE \"TEST\" RESETLOGS
NOARCHIVELOG ***
********************************************************************************** 
 
 
5. Change db_name in parameter file 
[oracle@app2 udump]$ cd $ORACLE_HOME/dbs 
[oracle@app2 u02]$ cp proddb/9.2.0/dbs/initPROD.ora proddb/9.2.0/dbs/initTEST.ora 
[oracle@app2 dbs]$ vi initTEST.ora 
 
 
6. Rename prod<> to test<> from a SEPARATE TERMINAL and Relink ORACLE_HOME - 
[oracle@app2 proddb]$ cd /u02 
[oracle@app2 u02]$ mv proddb testdb 
[oracle@app2 u02]$ cd /u02/testdb/9.2.0/appsutil/install/ 
[oracle@app2 install]$ sh adlnkoh.sh 
adlnkoh.sh started at Mon May 7 17:16:30 IST 2007 
logfile located in /u02/testdb/9.2.0/install/make.log 
 
 
adlnkoh.sh completed sucessfully 
[oracle@app2 install]$ echo $ORACLE_HOME 
/u02/proddb/9.2.0 
[oracle@app2 install]$ export ORACLE_HOME=/u02/testdb/9.2.0 
[oracle@app2 install]$ export ORACLE_SID=TEST 
[oracle@app2 dbs]$ export
PATH=/u02/testdb/9.2.0/bin:/u02/testdb/9.2.0/Apache/perl/bin:/u02/testdb/9.2.0/bin:
/usr/bin:/usr/sbin:/u02/testdb/9.2.0/jre/1.4.2/bin:/usr/ccs/bin:/bin:/usr/bin/X11:
/usr/local/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:
/usr/X11R6/bin:/usr/java/jre1.5.0_06/bin:/u01/oracle/bin:/sbin:/usr/sbin 
[oracle@app2 install]$ cd $ORACLE_HOME/bin 
[oracle@app2 bin]$ pwd 
/u02/testdb/9.2.0/bin 
[oracle@app2 bin]$ relink all 
 
 
7. Create all the ifiles, bdump/udump/cdump directories as per new architecture 
 
 
8. Recreate Controlfile - 
SQL> STARTUP NOMOUNT PFILE=/u02/testdb/9.2.0/dbs/initTEST.ora 
ORACLE instance started. 
 
 
Total System Global Area 581506668 bytes 
Fixed Size 452204 bytes 
Variable Size 402653184 bytes 
Database Buffers 167772160 bytes 
Redo Buffers 10629120 bytes 
SQL> CREATE CONTROLFILE REUSE SET DATABASE \"TEST\" RESETLOGS
NOARCHIVELOG
2 -- SET STANDBY TO MAXIMIZE PERFORMANCE 
.... .... .... 
52 \'/u02/testdata/a_ref02.dbf\' 
53 CHARACTER SET US7ASCII 
54 ; 
 
 
Control file created. 
 
 
SQL> ALTER DATABASE OPEN RESETLOGS; 
 
 
Database altered. 
 
 
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE \'/u02/testdata/temp01.dbf\' 
SIZE 1100M REUSE AUTOEXTEND OFF; 2 
 
 
Tablespace altered. 
 
 
-------------------- 
9. Rename appsTier dir structure 
10. Edit setup_stubs.sh to reflect these changes. 
[oracle@app2 bin]$ vi /u02/testora/iAS/setup_stubs.sh 
[oracle@app2 bin]$ export ORACLE_HOME=/u02/testora/8.0.6 
[oracle@app2 bin]$ export ORACLE_SID=TEST 
 
 
10. Call clonecontext to create new context-file - 
[oracle@app2 testcomn]$ cd /u02/testappl/ad/11.5.0/bin/ 
/usr/bin/java -classpath ../../../fnd/11.5.0/java/3rdparty/stdalone/jdbc111.zip:
../../../fnd/11.5.0/java/3rdparty/stdalone/xmlparserv2.zip:
/u02/testcomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/testora/8.0.6/forms60/java:
/
u02/testcomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/testcomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.j
ar:
/u02/testcomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:
/u02/testcomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/testcomn/java/appsborg2.zip:
/u02/testora/8.0.6/forms60/java:/u02/testcomn/java oracle.apps.ad.context.CloneContext 
-e /u02/testappl/admin/PROD_app2.xml -perl \"/u02/testora/iAS/Apache/perl/bin/perl\" 
-perl5lib \"/u02/testora/iAS/Apache/perl/lib/5.00503:
/u02/testora/iAS/Apache/perl/lib/site_perl/5.005:/u02/testappl/au/11.5.0/perl\" -tmpl
../admin/template/adxmlctx.tmp 
 
 
*********************************************************************** 
*** /usr/bin/java \\ 
*** -classpath oracle.apps.ad.context.CloneContext \\ 
*** -e \\ 
*** -perl \"/... .../iAS/Apache/perl/bin/perl\" \\ 
*** -perl5lib \"/.../iAS/Apache/perl/lib/5.00503:/.../Apache/perl/lib/site_perl/5.005:/perl\" \\ 
*** -tmpl ../admin/template/adxmlctx.tmp 
*********************************************************************** 
 
 
11. From a different terminal, run autoconfig 
[oracle@app2 bin]$ perl adconfig.pl contextfile=/u02/testappl/admin/TEST_app2.xml appspass=apps 
 
 
12. Start the services.

You might also like