Differences in Oracle on UNIX and Windows2000

zhaozj2021-02-16  55

Ian Adam, Saic Ltd

David Stien, Saic Ltd

Translation: fenng

Summary

Oracle is a leading database system in a wide range of UNIX hardware platforms. Oracle users and administrators are familiar with the Oracle architecture on the UNIX platform and the tools and techniques above it, and get the biggest benefit from their database. Instead, the Oracle architecture on Windows is not so well known. This article examines the key difference between the two operating systems from a DBA perspective.

Introduction

After reading a number of disappointing books, we wrote this article. The general cases of those books are trying to do too much things - in detail telling Windows and Oracle. Our article assumes the reader to familiarize with the work of Oracle DBA on the UNIX platform. Therefore, this article will analyze the key differences between Oracle on both platforms rather than from head teaches you Oracle. We don't want to use it as your detailed guidance or alternative to the manual, in fact it may encourage you to read some manuals. As a database server platform, it only involves some of UNIX and Windows, which is the purpose of this article.

example

This example uses the Oracle 8i on Linux, and the instance name is called Eighti. The instance name of the Oracle 8i on Windows 2000 is called ATEI.

Client access to Oracle

When the client is connected to Oracle, it is usually not related to the application of the Oracle server. This is actually hard to say. Oracle DBA and system managers are more concerned about the operating system platform, and they sometimes select the platform based on demand (such as runtime and scalability). More general cases, they accept (or take over) a given platform and learn from it to the greatest benefit.

About Windows 2000

It is worth mentioning that Windows 2000 is upgraded from Windows NT. There are many similar points between the two operating systems, and Windows 2000 also has some new features. Microsoft is shown in the following table from the upgrade pathway of NT4.0.

There are many similarities between the two systems:

-------------------------------------------------- -----------------------------------

NT 4.0 Windows 2000

-------------------------------------------------- -----------------------------------

NT 4.0 Workstation Windows 2000 Professional

NT 4.0 Server Windows 2000 Server

NT 4.0 Enterprise Edition Windows 2000 Advanced Server

UNIX Windows 2000 Datacenter Server

-------------------------------------------------- -----------------------------------

Oracle Backstage Process

The following sentence is very familiar with those who have used Oracle: "Every running Oracle database corresponds to an Oracle instance, when a database is started on the database server (regardless of the machine's type), Oracle assigns a memory area called System Global Area (SGA) and starts one or more Oracle processes. SGA and Oracle processes are called Oracle instances. "- From Oracle 8i Concepts [4 L Leverenz, 1999]. Processing the background process is placed in the first place and is also the most obvious difference between different operating systems. Oracle's background process on UNIX

Any user connected to UNIX can easily view the Oracle's background process:

% 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_eighti

Oracle8 19168 19167 0 16:43:46? 0:00 Oracleeighti

(Description = (local = yes) (Address = (protocol = beq)))))

The last line of Oracle processes are associated with a SQL * Plus session, and other processes are background processes. In Oracle we can see these processes by entering SQL * Plus.

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 a line, and a line of information is related to the SQL * Plus session, and the SPID corresponds to the corresponding UNIX process number.

Oracle background process on Windows2000

Go back to Windows, it is difficult to see the background process in the operating system. From the task manager, you may see the running application (see a method of viewing of the task manager: Right click on the taskbar right to select "Task Manager"). Oracle can be available on the server, but running is invisible. Process table does display a process called Oracle.exe,

Look at Alert Log Display Oracle's background process is 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

To see the actual daemon, you need to run additional software, for example, the process checks. This software can be from Windows

The 2000 CD is obtained (Windows NT can be obtained from the resource package).

On Windows 2000, the Oracle instance is implemented as a single Windows 2000 process (Oracle.exe). This process includes threads of each task that instances need to be implemented.

So a thread corresponds to each Oracle background process. The Oracle.exe process runs as a service, and you can see OraclesID from the control panel's service. Other services can also be controlled.

This allows Oracle to run in continuous operation when no user logs in. For all processes of shared master processor resources, Oracle can reach high speed and low load context.

Displaying the process in Oracle under UNIX, we can also reach the simple SQL statement. In order to display the PID column, the SQL statement has made some generous changes. Pay attention to the value of the PID matches the values ​​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.

Every background process has a line, and a line of information is related to the SQL * PLUS session. The program name does not specify the name of the background process, as in Unix, which can be connected to the V $ BGPRocess connection.

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.paddrand 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.

Disconnection

Submit the SQL Command ALTER SYSTEM Disconnect Session to disconnect the session. Sometimes you need to disconnect the session at the operating system level, on UNIX, through the kill command, the SQL session in the front example can be disconnected by entering the unix command:

Kill -9 19168

You can disconnect a session with ORAKILL on Windows 2000. ORAKILL is a specific command of Oracle on the Windows platform, which is installed under $ oracle_home / bin by default. Enter ORAKILL in the command line to see its usage. The SQL * PLUS session in the previous example can be disconnected by entering the following command:

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 ORAKILL will terminate it. Remember that killing a background process is never a good idea, especially on Windows, will cause the process to crash, and even cause the database to be unavailable.

Windows 2000 registry

As in other Windows 2000 applications, most settings of Oracle are in the registry. You should see what HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE should have. Some of these parameters will be discussed in detail later. Store like Oracle Services related parameters and other services:

HKEY_LOCAL_MACHINE / SYSTEM / CURRENTCONTROLSET / SERVICES.

Environment variable

Two most important variables in UNIX are Oracle_Home and Oracle_SID. Once these variables are set, the application can run and join the local database. Usually contain $ oracle_home / bin in $ PATH

In order to use Oracle tools (such as: SQLPLUS), you will not enter the trouble of entering the full path.

You can open the command line to set the Oracle_sID variable to the local database again in WINDOWS 2000. Other values ​​can be obtained from the registry.

Multiple Oracle Homes

Windows 2000 fully supports multiple Oracle HOME. Previously, this is a major problem on Windows NT, which has been supported after Oracle8.0.4. The support for this is very strong. A new application tool for Oracle Home Selector, Oracle8i, changing the environment path, making the selected Oracle Home path as the master home. Just simply changing the system path, put the bin directory selected by Oracle in the startup path.

Every bin directory has an Oracle.Key file indicating where the Oracle program can be found in the registry, where to find Oracle_home and other environment variables. If there is only one database on the server, it is usually set in the registry to set Oracle_SID. However, don't set Oracle_home, and for Oracle products, it is not necessary to cause problems. File system

More Oracle Home's support allows UNIX's OFA standards to be implemented on Windows. This greatly simplifies the transition from UNIX. The name of the top of the OFA directory tree has a difference, but the main subdirectory and file names are consistent in both operating systems.

Unix NT ORACLE_BASE / ORACLE / APP / ORACLE / ORACLE / APP/OrCle/Product/8.1.7 D: / Oracle / ORA817 Admin Directories / ORA817 Admin Directories / ORAS / 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

Starting from Oracle 8i, the name of the service manager is consistent on different platforms, called SVRMGRL. Before

The Oracle's execution file name changed on Windows NT changes as the version changes, which is very annoying for those working on multi-platform, especially when using some commands (IMP, EXP, etc.).

-------------------------------------------------- ----------------

Oracle Server Version Windows Server Manager executable

-------------------------------------------------- ----------------

7.3 SVRMGR23

8.0 SVRMGR30

8.1 SVRMGRL

-------------------------------------------------- ----------------

Note that Server Manager is gradually being eliminated (the translator Note: Svrmgrl is completely eliminated in 9i), and some additional features are added to SQL * PLUS.

Parti. To be continued ... ..

转载请注明原文地址:https://www.9cbs.com/read-27606.html

New Post(0)