“ADI Menu” use to change Oracle Applications Desktop Integrator connection.

@ECHO off
cls
:start
ECHO.
ECHO ADI Menu.
ECHO 1. DB1
ECHO 2. DB2
ECHO 3. DB3
ECHO 4. DB4
ECHO 5. DB5
ECHO 6. Exit
set choice=
set /p choice=Please select database from the above list and press enter:
REM if not ‘%choice%’==” set choice=%choice:~0,1%
if ‘%choice%’==’1’ goto DB1
if ‘%choice%’==’2’ goto DB2
if ‘%choice%’==’3’ goto DB3
if ‘%choice%’==’4’ goto DB4
if ‘%choice%’==’5’ goto DB5
if ‘%choice%’==’6’ goto Exit
REM set choice
ECHO "%choice%" is not a valid input, Please try again.
pause
ECHO.
cls
goto start
:DB1
ECHO DB1 selected.
del /q C:\orant\NET80\ADMIN\sqlnet.ora
del /q C:\orant\NET80\ADMIN\tnsnames.ora
del /q C:\orant\NETWORK\ADMIN\sqlnet.ora
del /q C:\orant\NETWORK\ADMIN\tnsnames.ora
copy C:\ADI\tnsnames.ora_DB1 C:\orant\NETWORK\ADMIN\
copy C:\ADI\tnsnames.ora_DB1 C:\orant\NET80\ADMIN\
ren C:\orant\NETWORK\ADMIN\tnsnames.ora_DB1 tnsnames.ora
ren C:\orant\NET80\ADMIN\tnsnames.ora_DB1 tnsnames.ora
regedit /s c:\adi\DB1.reg
goto end
:DB2
ECHO DB2 selected.
del /q C:\orant\NET80\ADMIN\sqlnet.ora
del /q C:\orant\NET80\ADMIN\tnsnames.ora
del /q C:\orant\NETWORK\ADMIN\sqlnet.ora
del /q C:\orant\NETWORK\ADMIN\tnsnames.ora
copy C:\ADI\tnsnames.ora_DB2 C:\orant\NETWORK\ADMIN\
copy C:\ADI\tnsnames.ora_DB2 C:\orant\NET80\ADMIN\
ren C:\orant\NETWORK\ADMIN\tnsnames.ora_DB2 tnsnames.ora
ren C:\orant\NET80\ADMIN\tnsnames.ora_DB2 tnsnames.ora
regedit /s c:\adi\DB2.reg
goto end
:DB3
ECHO DB3 selected.
del /q C:\orant\NET80\ADMIN\sqlnet.ora
del /q C:\orant\NET80\ADMIN\tnsnames.ora
del /q C:\orant\NETWORK\ADMIN\sqlnet.ora
del /q C:\orant\NETWORK\ADMIN\tnsnames.ora
copy C:\ADI\tnsnames.ora_DB3 C:\orant\NETWORK\ADMIN\
copy C:\ADI\tnsnames.ora_DB3 C:\orant\NET80\ADMIN\
ren C:\orant\NETWORK\ADMIN\tnsnames.ora_DB3 tnsnames.ora
ren C:\orant\NET80\ADMIN\tnsnames.ora_DB3 tnsnames.ora
regedit /s c:\adi\DB3.reg
goto end
:DB4
ECHO DB4 selected.
del /q C:\orant\NET80\ADMIN\sqlnet.ora
del /q C:\orant\NET80\ADMIN\tnsnames.ora
del /q C:\orant\NETWORK\ADMIN\sqlnet.ora
del /q C:\orant\NETWORK\ADMIN\tnsnames.ora
copy C:\ADI\tnsnames.ora_DB4 C:\orant\NETWORK\ADMIN\
copy C:\ADI\tnsnames.ora_DB4 C:\orant\NET80\ADMIN\
ren C:\orant\NETWORK\ADMIN\tnsnames.ora_DB4 tnsnames.ora
ren C:\orant\NET80\ADMIN\tnsnames.ora_DB4 tnsnames.ora
regedit /s c:\adi\DB4.reg
goto end
:DB5
ECHO DB5 selected.
del /q C:\orant\NET80\ADMIN\sqlnet.ora
del /q C:\orant\NET80\ADMIN\tnsnames.ora
del /q C:\orant\NETWORK\ADMIN\sqlnet.ora
del /q C:\orant\NETWORK\ADMIN\tnsnames.ora
copy C:\ADI\tnsnames.ora_DB5 C:\orant\NETWORK\ADMIN\
copy C:\ADI\tnsnames.ora_DB5 C:\orant\NET80\ADMIN\
ren C:\orant\NETWORK\ADMIN\tnsnames.ora_DB5 tnsnames.ora
ren C:\orant\NET80\ADMIN\tnsnames.ora_DB5 tnsnames.ora
regedit /s c:\adi\DB5.reg
goto end
:Cancel
exit
:end
start C:\orant\BIN\GLDI9032.EXE
 
 
 *The database registry key is located in [HKEY_CURRENT_USER\Software\ORACLE\GLDI\GLDI90 APPS INSTANCES]*

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s