Oracle for WindowsNT FAQ

Should I use NT Client or NT Server to run Oracle?

Windows NT comes in two flavours: Workstation and Server. These terms are highly misleading, suggesting that a machine with server functions should run NT Server. That is not the case at all. The distinction between Workstation and Server is only important to NT itself. The Server product includes the NT domain administration tools and services. If you have more than one NT machine in a network you will probably want one of them to be an NT Server machine to act as the domain controller, but you probably DON'T want to run the Oracle database server on that machine.
The Oracle database server and tools will run equally well on an NT "Workstation" machine as on an NT "Server" machine, unless the Server machine is the Domain Controller for a busy domain, in which case it would be a poor choice to host a busy database server as well.
Back to top of file

What Oracle services must be running on a NT box?
To check that the necessary Oracle services are up and running go to CONTROL PANEL/ SERVICES (or type "net start" from a DOS window). You should see at least two lines - OracleStartSID and OracleServiceSID (if you have a SQL*Net listener running, you should see a line for that as well).
Back to top of file

How can I automatically start Oracle on NT?
Check to make sure the OracleServiceSID and OracleStartSID services are started. Go to the control panel/services to perform this task. Make sure that both services are set as AUTOMATIC.
You may need to recreate the two services mentioned above. Do the following, assuming a SID of TEST.
If the services were not created, create them from the DOS command prompt using Oradimxx (where xx is the version, 73 for 7.3 or 80 for 8.0). NOTE: Each oradim command below should be typed as one line.
Open a DOS Command Prompt window.
- If neither service was created:
oradimxx -new -sid TEST -intpwd ORACLE -startmode AUTO -pfile C:\ORANT\DATANASE\INITTEST.ORA
- If only OracleStartTEST was not created:
oradimxx -delete -sid TEST
oradimxx -new -sid TEST -intpwd ORACLE -startmode AUTO -pfile C:\ORANT\DATANASE\INITTEST.ORA
Back to top of file

Can one start and stop services from a batch job?
Issue commands similar to these from a batch file:
net start "OracleAgent"
net start "OracleStartSID"
rem net start "OracleServiceSID" /y
net start "OracleTNSListener"
net start "OracleWWWListener9999"
To stop the services, use net stop instead of net start.
These commands are handy if you need to shut down the database for a cold (offline) backup. Do not put this batch file in your Windows startup group as the database will then only start when someone logs onto the server. The database will not start if the server is re-booted and waits on the log-on screen.
The following registry entries are also handy to prevent a SHUTDOWN ABORT when the OracleServiceSID service is stopped:
Back to top of file

How does one kill Oracle processes on NT?
Use the orakill command that comes with Oracle for NT to kill a thread. You need to specify the thread ID in Hex. Try orakill /? or orakill /h for more details.
Back to top of file

How does one take a hot database backup on NT?
You need to use the Oracle OCOPYxx.EXE utility on Windows NT to backup open database files (e.g. do a hotbackup).
The NTBACKUP command will not backup open files. Also, OCOPYxx.exe (e.g. OCOPY80.EXE distributed with Oracle8.0) will not backup files to tape, only to another disk location. Once the hotbackup to disk is complete, you can use the NTBACKUP utility to backup the files to tape.
Note: If you perform a hot backup your databases must run in archivelog mode, otherwise shutdown and do a cold backup.
Back to top of file

Can I schedule backups and maintenance jobs on NT Server?
Yes, make sure the SCHEDULE service is running (control panel/ services/ schedule). You can now schedule jobs by issuing the AT command. Eg:
C:>at 12:00pm "my_backup"
Added a new job with job ID = 0
To get a list of scheduled jobs, execute the AT command without any parameters: Eg:
Status ID Day Time Command Line
0 Tomorrow 12:00 PM my_backup
For more info, type AT /?
Also note that several alternatives exist to the AT command. For example, there is a GUI utility in the NT Resource Kit CD-ROM for scheduling jobs. This utility will (supposedly) become part of the OS with version 5.0. It's a lot more convenient to use than its command-line counterpart AT.
Back to top of file

How can I fool Oracle to think a remote database is local?
Some products, like Oracle WebDB, require a local Oracle database. You can direct all connect requests to a TNSNAMES.ORA connect descriptor by setting the LOCAL string in your Windows registry. Whenever you now connect to a database without a connect string, the remote database will be used.
 Run the RegEdt32 program
 Go to Edit/ Add value and type in LOCAL
 When prompted for a String, enter your TNSNAMES.ORA alias.
PS: In a BAT or CMD file, you can just do a "set LOCAL=alias_name".
Back to top of file

Any performance tuning tips for Oracle on NT?

 Make sure you have enough memory. If real memory on your system is limited, the CPU will spend considerable time paging and swapping.
 Change the machine configuration from the default "Maximize throughput for file sharing" to "Maximize throughput for network applications" (Right click on Network Neighborhood/ Services/ Server/ Properties).
 Remove any protocols not required from the installed network software list.
 Move the primary used protocol to the top of the list. writing to disk.
 Stop all unnecessary services on your machine.
 Use proper file placement so I/O is spread evenly across disks. If possible use RAID devices.
 Filesystem overhead can be eliminated by using raw devices.
 You get the best performance when all threads runs with NORMAL priority (see the ORACLE_PRIORITY registry value).
 The default DB_BLOCK_SIZE on NT is 2k, Increase this if you use your system for DSS queries.
 If all else fails, consider upgrading to Unix or MVS. You can migrate an Oracle database to a different platform without impacting your end-users.
Back to top of file

Where can I get more info about WindowsNT?

 The Oracle DBA's guide to NT
 Microsoft's Windows NT Home Page
 Windows NT FAQ
Back to top of file

No comments: