[Oracle] differences between UNIX and Oracle on Windows 2000 (I)

Source: Internet
Author: User
Summary

Oracle Database is a well-known leading database system on Unix hardware platforms. Oracle users and administrators are therefore familiar with the Oracle architecture on the UNIX platform and the tools and skills above it, and get the greatest benefit from their databases. On the contrary, Oracle architecture on windows is not so widely known. This article starts from a "> DBAThe key similarities and differences between the two operating systems are examined.

Introduction

After reading a few disappointing books in this area, we wrote this article. The common problem with those books is trying to do too many things-discussing windows and Oracle in details. This article assumes that the reader is familiar with Oracle on the UNIX platform "> DBA. Therefore, this article will analyze the key differences between Oracle on the two platforms rather than the Oracle skills from the beginning. We don't want to use it as a detailed guide or a substitute for the manual. In fact, this article will encourage you to read some manuals. As a database server platform, it only involves some advantages related to Unix and windows, which is the purpose of this Article.

Example

In this example, we use Oracle 8i on Linux and the Instance name is eighti. The Oracle 8i Instance name on Windows 2000 is ATEi.

Access from the client to Oracle

When the client is connected to Oracle, the Oracle server platform is generally independent of the client application. This is hard to tell. Oracle DBAs and system administrators are more interested in operating system platforms. Sometimes they choose platforms based on requirements (such as running time and scalability. In general, they accept (or take over) the given platform and learn to get the maximum benefit from it.

About Windows 2000

It is worth mentioning that Windows 2000 is upgraded from Windows NT. There are many similarities between the two operating systems, and Windows 2000 has some new features. The following table lists the update Methods From NT4.0.

There are many similarities between the two systems:

NNT 4.0 Windows 2000
NT 4.0 Workstation Windows 2000 Professional
NNT 4.0 Server Windows 2000 Server
NNT 4.0 Enterprise Edition Windows 2000 Advanced Server
UNIX Windows 2000 datacenter Server
Oracle background process

The following sentence is familiar to oracle users:

Each running Oracle database corresponds to an oracle instance. When a database is started on a database server (regardless of the machine type, oracle allocates a block called system global area ("> SGA) And start one or more Oracle processes. The SGA and Oracle processes are collectively called Oracle instances.
-- From Oracle 8i Concepts [4 L leverenz, 1999].

The processing of background processes is the first and the most obvious difference between different operating systems.

Background process of Oracle on UNIX

Any user connected to Unix can easily view the background processes of Oracle:

% ps -ef|grep eighti|grep -v grep 
oracle8 18451 1 0 16:37:18 ? 0:00 ora_pmon_eighti oracle8 18453 1 0 16:37:19 ? 0:00 ora_dbw0_eighti oracle8 18457 1 0 16:37:19 ? 0:04 ora_ckpt_eighti oracle8 18461 1 0 16:37:19 ? 0:00 ora_reco_eighti oracle8 18455 1 0 16:37:19 ? 0:02 ora_lgwr_eighti oracle8 18459 1 0 16:37:19 ? 0:01 ora_smon_eightioracle8 19168 19167 0 16:43:46 ? 0:00 oracleeighti (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

The Oracle process in the last line is related to an SQL * Plus session. Other processes are background processes. In Oracle, we can view these processes by entering the SQL * Plus session:

SELECT SID, spid, osuser, s.program  FROM v$process p, v$session s WHERE p.addr = s.paddr; 
SID SPID OSUSER PROGRAM ------------------------------------------------------------------- 1 18451 oracle8 oracle@saic02 (PMON) 2 18453 oracle8 oracle@saic02 (DBW0) 3 18455 oracle8 oracle@saic02 (LGWR) 4 18457 oracle8 oracle@saic02 (CKPT) 5 18459 oracle8 oracle@saic02 (SMON) 6 18461 oracle8 oracle@saic02 (RECO) 7 19168 oracle8 sqlplus@saic02(TNS V1-V3)
7 rows selected.

Each background process has one line, and one line of information is related to the SQL * Plus session. The spid corresponds to the Unix process number.

Oracle background process on Windows2000

Going back to Windows, it is difficult to view background processes from the operating system. The running application may be displayed in the Task Manager (view method of the task manager: Right-click the task manager in the taskbar and choose "Task Manager "). Oracle can be available on the server, but the running applications are invisible. The progress table does show a process called oracle. EXE. Check Alert Log to show that all background processes in Oracle are started:

PMON started with pid=2 DBW0 started with pid=3 LGWR started with pid=4 CKPT started with pid=5 SMON started with pid=6 RECO started with pid=7 

Depending on the actual background process, you need to run additional software, such as the process viewer. This software can be used from Windows 2000 "> Cd(If it is Windows NT, you can get it from the resource package ).

In Windows 2000, Oracle instances are implemented as a single windows 2000 process (Oracle. EXE. This process includes the threads of each task to be implemented by the instance.

Therefore, a thread corresponds to each Oracle background process. The Oracle. EXE process runs as a service. You can view oracleservicesid in the control panel service. Other services can also be controlled in this way.

This allows Oracle to run continuously when no user logs on to the server. For all processes that share the primary processor resources, Oracle can achieve high-speed, low-load context switching.

Display processes in Oracle in Unix. You can also enter a simple "> SQLStatement. To display the PID column, "> SQLThe statement has been slightly modified. Note that the PID matches the value reported in the warning log.

SELECT s.SID, p.pid, p.spid signaled, s.osuser, s.program  FROM v$process p, v$session s WHERE p.addr = s.paddr; 
SID PID THREADID OSUSER PROGRAM ---- ------- --------- --------------- --------------------1 2 1088 SYSTEM ORACLE.EXE 2 3 1172 SYSTEM ORACLE.EXE 3 4 1180 SYSTEM ORACLE.EXE 4 5 1192 SYSTEM ORACLE.EXE 5 6 1212 SYSTEM ORACLE.EXE 6 7 1220 SYSTEM ORACLE.EXE 7 8 1200 Administrator SQLPLUSW.EXE
7 rows selected.

Each background process has one line and one line of information related to the SQL * Plus session. The program name does not specify the name of the background process. Like in UNIX, these names can be obtained through connection with V $ bgprocess.

SELECT s.SID SID, p.spid threadid, p.program processname, bg.NAME NAME  FROM v$process p, v$session s, v$bgprocess bg WHERE p.addr = s.paddr AND p.addr = bg.paddr AND bg.paddr <> '00'; 
SID THREADID PROCESSNAME NAME ---------- --------- --------------- ------------- 1 1088 ORACLE.EXE PMON 2 1172 ORACLE.EXE DBW0 3 1180 ORACLE.EXE LGWR 4 1192 ORACLE.EXE CKPT 5 1212 ORACLE.EXE SMON 6 1220 ORACLE.EXE RECO
6 rows selected.
Disconnect a session

Submit "> SQLRun the alter system disconnect session command to disconnect the session. Sometimes you need to disconnect the session at the operating system level. On UNIX, run the kill command. In the preceding example, "> SQLYou can run the following Unix Command to disconnect a session:

kill -9 19168 

On Windows 2000, you can use orakill to disconnect a session. Orakill is a specific Oracle command on windows. It is installed under $ ORACLE_HOME/bin by default. Enter orakill in the command line to view its usage. In the preceding example, you can run the following command to disconnect an SQL * Plus session:

orakill atei 1200 Kill of thread id 1200 in instance atei successfully signaled. 

In Windows 2000, if a disconnected session is marked as "marked for kill" but not deleted, orakill terminates it. However, it is always not a good idea to kill a background process, especially on windows, which may cause the process to crash or even cause the database to become unavailable.

Windows 2000 Registry

Like other Windows 2000 applications, most Oracle settings are in the registry. You should check what is under HKEY_LOCAL_MACHINE/software/oracle in the registry. Some of these parameters will be discussed in detail later. Parameters related to Oracle services are stored in the same location as other services:
HKEY_LOCAL_MACHINE/system/CurrentControlSet/services

Environment Variable

In UNIX, the two most important variables are ORACLE_HOME and oracle_sid. Once these variables are set, the application can run in parallel to the local database. Usually, $ ORACLE_HOME/bin is included in $ path to save the trouble of entering the full path when using Oracle tools (such as SQL * Plus.

In Windows 2000, you can open the command line to set the oracle_sid variable and then connect it to the local database. Other values can be obtained from the Registry.

Multiple Oracle homes

Windows 2000 fully supports multiple Oracle Home. Previously, this was a major problem on Windows NT and was not supported until after Oracle 8.0.4. The initial support for this was poor. Oracle Home selector, a new application tool of Oracle8i, changes the environment path and uses the selected Oracle Home path as the main home. Simply change the system path and select "> bin" from Oracle.Directory in the startup path.

Every BinThe directory contains an oracle. Key file that specifies where Oracle programs can find ORACLE_HOME and other environment variables in the registry. If there is only one database on the server, oracle_sid is usually set in the registry. However, do not set ORACLE_HOME, which is not required by Oracle products at all and may cause problems.

File System

Multi-Oracle Home supports implementing UNIX ofa standards on Windows. This greatly simplifies the transition from UNIX. The top-level names of the ofa directory tree are different, but the main subdirectories and file names are consistent in both operating systems.

UNIX NT
Oracle_base /Oracle/APP/Oracle D:/Oracle
ORACLE_HOME /Oracle/APP/Oracle/product/8.1.7 D:/Oracle/ora817
Admin Directories /Oracle/APP/Oracle/admin D:/Oracle/admin
Database Files /Db01/oradata/"> Sid D:/Oracle/oradata/Sid
/DB02/oradata/"> Sid F:/Oracle/oradata/Sid
/Db03/oradata/"> Sid G:/Oracle/oradata/Sid
Service Manager

Since Oracle 8i, the Service Manager names are consistent on different platforms, all of which are called svrmgrl. In the past, the name of Oracle execution files on Windows NT changed with version changes. This is annoying for those who work on multiple platforms, especially when using some commands (IMP, exp, etc.

Oracle Server version Windows Server Manager executable program
7.3 Svrmgr23
8.0 Svrmgr30
8.1 Svrmgrl

Note that Server Manager is being phased out (the svrmgrl is completely eliminated in 9i), and some additional functions are added to SQL * Plus.

Http://www.dbanotes.net/database/oracle_unix_vs_windows_2000.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.