Index   Search   Add FAQ   Ask Question  
 

Please note: This page is not maintained anymore. Please visit the new and improved FAQ at http://www.orafaq.com/faq/windows

Oracle for Windows NT and 2000 FAQ

$Date: 27-Jul-2001 $
$Revision: 1.24b $
$Author: Frank Naudé $

Topics

  • How is Oracle implemented on Windows NT and 2000?
  • Should one use NT Workstation, NT Server or Windows 2000 to run Oracle?
  • How does one use the Oracle supplied command line utilities?
  • How does one create a new database on NT/ 2000?
  • What Oracle services must be running on a NT/2000 box?
  • How can I automatically start Oracle on NT/2000?
  • Can one start and stop services from a batch job?
  • How does one take a hot database backup on NT/2000?
  • How does one kill Oracle processes on NT/2000?
  • Can I schedule backups and maintenance jobs on NT/2000?
  • How can I fool Oracle to think a remote database is local?
  • Any performance tuning tips for Oracle on NT/2000?
  • What NT/2000 commands can be used when administrating my database?
  • Is there a decent scripting environment for Windows NT/2000?
  • What are the Oracle Services for MTS?
  • Does Oracle Parallel Server use MS Clustering Services (MSCS)?
  • What is the difference between FailSafe and Oracle Parallel Server?
  • Where can one get more info about Windows NT/2000?

  • Back to Oracle FAQ Index

    How is Oracle implemented on Windows NT and 2000?

    Oracle on Windows NT and 2000 is running as a service that is implemented as a single multi-threaded process:

    Services: Oracle on Windows NT and 2000 doesn't run as typical Windows processes, but as a Windows service. A service is basically a background process that is independent of who is using the console or system at any particular time. Services can be started at system boot time and can be compared to Unix daemon processes. To check that the required Oracle services are up and running, go to CONTROL PANEL/ SERVICES (or type "net start | more" from a DOS console window).

    Multi Threaded: Unlike on Unix, the Oracle instance on NT and 2000 is implemented as a single operating system process. This process include threads that implement each of the tasks required for the instance to function. Therefore, there is a thread for each of the background (lgwr, dbwr, arch, etc.) and server tasks, plus a two-thread overhead. Because each thread shares the same memory space, there is no need to implement the SGA in shared memory. All memory it is available to all threads within the process.

  • Back to top of file

  • Should one use NT Workstation, NT Server or Windows 2000 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.

    The same applies to the different Windows 2000 releases.

  • Back to top of file

  • How does one use the Oracle supplied command line utilities?

    Most oracle command line utilities are stored in the %ORACLE_HOME%\bin subdirectory. Some of the supplied command line utilities are: sqlplus, svrmgrl, imp, exp, sqlldr, etc.

    For Oracle releases below 8i, these command will have a XX suffix (eg svrmgr30), where XX is the utility's version number.

    Before using any of these utilities, set the required environment variables. Look at this example:

             DOS> set oracle_sid=oracle
             DOS> svrmgrl
    

  • Back to top of file

  • How does one create a new database on NT/ 2000?

    One can create a "starter" database as part of the installation process. If you need to create any additional databases, one can use the Oracle Database Configuration Assistant (DBAssist) GUI utility.

    One can also create a new database from the Console Window. Start by generating some sample scripts using the Database Configuration Assistant. Modify them according to your standards, and run them to create your database.

  • Back to top of file

  • What Oracle services must be running on a NT/2000 box?

    For Oracle 8i and above, one can start the database by starting the OracleServiceSID service. For Oracle versions below 8i one should see at least two services - OracleStartSID and OracleServiceSID.

    Some of the other optional services are:

  • Back to top of file

  • How can I automatically start Oracle on NT/2000?

    To start a database automatically when your server boots up, ensure the following registry setting is enabled: ORA_sid_AUTOSTART.

    One can also specify autostart when creating new database services. Verify if this was done by opening Control Panel -> Services (Control Panel -> Administrative Tools -> Services on Windows 2000) and check if it is set to AUTOMATIC.

    You may need to recreate the services mentioned above using the "oradim" (Instance Manager) utility. Start by opening a DOS command console window. Look at this example (assume a SID of TEST):

             rem Delete the old service
             ORADIM -DELETE -SID test -SRVC servicename
    
             rem Create a new services with the STARTMODE AUTO property
             oradim -new -sid TEST -intpwd ORACLE -startmode AUTO -pfile C:\orant\admin\TEST\pfile\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 "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:

            [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
            "ORA_SID_SHUTDOWN"="TRUE"
            "ORA_SID_SHUTDOWN_TIMEOUT"="60"
    

  • Back to top of file

  • How does one kill Oracle processes on NT/2000?

    One normally kills Oracle processes using the "alter system kill session" command. One can also use the orakill.exe command that comes with Oracle for NT/2000 to kill a thread. You need to specify the thread ID in Hex. Try orakill /? or orakill /h for more details. Example:
             SQL> select spid as thread, osuser, s.program
             SQL> from   sys.v_$process p, sys.v_$session s
             SQL> where  p.addr = s.paddr;
    
             DOS> orakill.exe sid thread
    

  • Back to top of file

  • How does one take a hot database backup on NT/2000?

    You need to use the Oracle OCOPY.EXE utility on Windows NT/2000 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 1: If you perform a hot backup your databases must run in archivelog mode, otherwise shutdown and do a cold backup. Read the Oracle Backup and Recovery FAQ for more details.

  • Back to top of file

  • Can I schedule backups and maintenance jobs on NT/2000?

    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:
            C:>at
            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. 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/2000?

  • Back to top of file

  • What NT/2000 commands can be used when administrating my database?

    You may find the following commands useful:

    at Schedule jobs to run
    hostname Your machine name. Listed in LISTENER.ORA.
    ipconfig Your machine's IP address. Listed in LISTENER.ORA.
    netstat Monitor network connections.

  • Back to top of file

  • Is there a decent scripting environment for Windows NT/2000?

    Third-party scripting languages like Perl and Python can be downloaded and installed on Windows NT and 2000 systems. Perl (my favorite) can be downloaded from www.activeperl.com. Python can be downloaded from www.python.org.

    Microsoft's commercial solution to the lack of a proper scripting language is called Microsoft SFS (Services for UNIX). SFS ships with a Unix borne shell, ActiveState Perl and other common Unix utilities like ls, crontab, grep, vi, top, ps, kill, etc. It also includes a Telnet Server to provide terminal access to your NT/2000 machines. This is extremely handy if you need to work from home.

    More information about Windows Services for UNIX can be obtained from www.microsoft.com/windows/sfu.

  • Back to top of file

  • What is the difference between FailSafe and Oracle Parallel Server?

    Both Oracle FailFave and Parallel Server runs on Clustered Hardware.

    Oracle FailSafe provides a high-availability database solution for Windows NT/2000 clusters. In the event of system failure, FailSafe will recover and restart the database on an alternative node within the cluster.

    Oracle Parallel Server clusters databases for providing high availability and scalability through the use of shared storage systems. It allows users on multiple nodes to access a common Oracle database simultaneously. It enables multiple Oracle Server instances to run on different nodes of a cluster while providing concurrent access to common data.

  • Back to top of file

  • Does Parallel Server use MS Clustering Services (MSCS)?

    No. Oracle Parallel Server (OPS) and Real Application Clusters (RAC) contains its own clustering services for all Intel (Windows/ Linux) platforms. This means that an OPS/RAC cluster only provides high availability for the database environment.

  • Back to top of file

  • What are the Oracle Services for MTS?

    The Oracle Services for MTS allow an Oracle database to act as a resource manager in a MTS (Microsoft Transaction Server)/DTC transaction environment. This is possible because the Oracle Database supports the XA standard.

    Some of the benefits that MTS provides are:

  • Back to top of file

  • Where can one get more info about Windows NT/2000?

  • Back to top of file
  • HOME | ASK QUESTION | ADD FAQ | SEARCH | E-MAIL US