PDA

View Full Version : How to....?



udayms
06-16-2004, 11:13 PM
Hello Everyone,
I am new to this group. I just wanted clarify a few things. Hope you can help me out. I have to create an installation to perform the following operations:-

1. Install JDK
2. Install Tomcat
3. Install Oracle [Server & Client]
4. Install 2 more 3rd Party applications (not utilities... these apps their own set of installations... but configurations to the env. variables has to be handled by our installation)
5. Then create a DSN for Oracle
6. Create a Schema
7. Create a few tables under the schema by running sql scripts.
8. Create another schema and create few more tables under that schema.
9. Copy a set of folders to the installation directory
10. Copy another set of folders to the Web Apps directory under Tomcat.
11. Restart
12. Delete any/all temp files created during the installation.


Now.... First Q - is this possible? Also, as the application is platform independant.... can our installation be platform independant too...? If yes, can anyone briefly outline an approach [Neednt be very detailed]. ....? Any insight would be helpful.

Regards,
Uday

Bill Carlisle
05-10-2005, 01:57 PM
This is what I have so far...


if (LaunchAppAndWait (SRCDISK ^ "Disk1\\Setup.exe", "-responsefile \""+RSP_FILE+"\" -silent", WAIT) < 0) then
gszLogMsg = "Unable to launch Oracle Setup.exe";
WriteToLog(gszLogMsg);
MessageBox (gszLogMsg,SEVERE);
else
nPercent = 1;
gszLogMsg = "Oracle is now installing, this may take up to 15-20 minutes";
SetStatusWindow(nPercent, gszLogMsg);
WriteToLog(gszLogMsg);

Enable(STATUS);
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SYSTEM\\CurrentControlSet\\Services\\OracleServicePAIN";
szKey1 ="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{D5946AF2-3399-11D7-AFDD-E5BE1EDF9FCB}";
szKey2 ="SYSTEM\\ControlSet001\\Services\\OraclePAINPagingServer";
szKey3 ="SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\OracleAgent";
szKey4 ="SOFTWARE\\Classes\\TypeLib\\{0BB9AFD1-51A1-11D2-BB7D-00C04FA30080}\\1.0\\0\\win32";
szKey5 ="SOFTWARE\\HQ AFPC\\ManperB Oracle Installer";
szKey6 ="SYSTEM\\ControlSet001\\Control\\Session Manager\\Environment";
szKey7 ="SOFTWARE\\Classes\\CLSID\\{51A5FC60-13DF-11CF-BE51-0020AFE55F5C}\\InprocServer32";
szKey8 ="SOFTWARE\\Classes\\MMDX.MmdxCtrl.1";
szKey9 ="SOFTWARE\\Classes\\CLSID\\{3893B4A0-FFD8-101A-ADF2-04021C007002}";
szKey10="SOFTWARE\\Classes\\CLSID\\{3F63C36E-51A3-11D2-BB7D-00C04FA30080}";
szKey11="SOFTWARE\\ORACLE";
bvKey1 = FALSE;
bvKey2 = FALSE;
bvKey3 = FALSE;
bvKey4 = FALSE;
bvKey5 = FALSE;
bvKey6 = FALSE;
bvKey7 = FALSE;
bvKey8 = FALSE;
bvKey9 = FALSE;
bvKey10 = FALSE;
bvKey11 = FALSE;


// wait until the instance service is installed
svMsg = "Oracle installing - Estimated time remaining is ";

gszLogMsg = "Starting 1st Loop looking for ["+szKey+"]";
WriteToLog(gszLogMsg);

nMinutesRemain = 6;
nSecondsRemain = 0;
nTotalSeconds = (nMinutesRemain*60) + nSecondsRemain;
while nMinutesRemain > 0
// Percentage bar meter
nPercent = nPercent + 1;
nResults = NumToStr (svPercent, nPercent);
bvFOUND = FALSE;

if (!(bvKey1) && (RegDBKeyExist(szKey1)=1)) then
bvKey1 = TRUE;
gszLogMsg = szKey1;
bvFOUND = TRUE;
elseif !(bvKey2) && RegDBKeyExist(szKey2) then
bvKey2 = TRUE;
gszLogMsg = szKey2;
bvFOUND = TRUE;
elseif !(bvKey3) && RegDBKeyExist(szKey3) then
bvKey3 = TRUE;
gszLogMsg = szKey3;
bvFOUND = TRUE;
elseif !(bvKey4) && RegDBKeyExist(szKey4) then
bvKey4 = TRUE;
gszLogMsg = szKey4;
bvFOUND = TRUE;
elseif !(bvKey5) && RegDBKeyExist(szKey5) then
gszLogMsg = szKey5;
bvKey5 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey6) && RegDBKeyExist(szKey6) then
gszLogMsg = szKey6;
bvKey6 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey7) && RegDBKeyExist(szKey7) then
gszLogMsg = szKey7;
bvKey7 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey8) && RegDBKeyExist(szKey8) then
gszLogMsg = szKey8;
bvKey8 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey9) && RegDBKeyExist(szKey9) then
gszLogMsg = szKey9;
bvKey9 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey10) && RegDBKeyExist(szKey10) then
gszLogMsg = szKey10;
bvKey10 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey11) && RegDBKeyExist(szKey11) then
gszLogMsg = szKey11;
bvKey11 = TRUE;
bvFOUND = TRUE;
endif;
if bvFOUND then
gszLogMsg = "Found ["+gszLogMsg+"] %["+svPercent+"]";
else
gszLogMsg = "No Hit on Installed Keys";
endif;
WriteToLog(gszLogMsg);

WriteToLog("Starting 10 second delay");
// Remaining time text meter - smaller increments
// 5 increments x 2 seconds each = 10 seconds delay.
for iCount = 1 to 5
nResults = NumToStr (svMinutesRemain, nMinutesRemain);
nResults = NumToStr (svSecondsRemain, nSecondsRemain);
svTimeRemain = svMinutesRemain + ":" + svSecondsRemain + " minutes.";

nResults = NumToStr (svPercent, nPercent);
gszLogMsg = svPercent+"% "+ svMsg + svTimeRemain;
WriteToLog(gszLogMsg);

SetStatusWindow(nPercent, svMsg + svTimeRemain);
Delay(2);
nTotalSeconds = nTotalSeconds - 2;
nMinutesRemain = nTotalSeconds/60;
nSecondsRemain = nTotalSeconds - (nMinutesRemain*60);
endfor;
WriteToLog("Ending 10 second delay");
endwhile;

jweber
05-10-2005, 03:26 PM
1. Possible yes...
2. Platform independent - probably. depends on what platforms you want to support.

Just some FYIs...

Installing JDK and Tomcat should be a snap. Simple lay down of files. Oracle is not so simple. You might want to investigate how you can launch the oracle installer as a part of your installation. Might not be that bad, but in my experience which is going back a handul of years, its usually best to require Oracle be on the machine prior to installing an application. Many reasons to this including...

1. It adds undue complexity to installation.
2. In Enterprise scenarios the Db Admin and the one installing are two different people.
3.

Creating the schema/DSN, will probably require custom code, but there are some decent examples of this on the forums. Everything else should be easy.

Bill Carlisle
05-20-2005, 09:18 AM
Hi,
All seems to be working awesome!

Now I need to know when I should reboot and when not to...??

On the Oracle install component I know I need to reboot to start the services and the database... but what about others?

Do you need to reboot in Win2000 after registry creations or deletes?

Any rules or guide lines?

Thank you again for your help, Bill

jweber
05-20-2005, 09:54 AM
IMHO, modifying the registry in 2K/XP usually doesnt require a reboot. There may be certain scenarios in which you need to, but I couldnt tell you what.

It seems the ISX reboot dialog only becomes active if you update an environment var....

Bill Carlisle
05-20-2005, 09:57 AM
I've been doing a bit of research... the help says using sdFinishEx calls sdFinish if there is no locked files and sdFinishReboot if there are.. so it does the calculating for me I guess... I'm going to try it ...

Thanks for the input!! :)