Oracle Database Differences on Windows and UNIX

本文详细对比了Oracle数据库在Windows和UNIX平台上的关键差异,包括自动启动和关闭、后台处理、诊断和调优工具、直接写入磁盘、动态链接库等特性,为跨平台迁移提供了宝贵的指导。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Oracle Database Differences on Windows and UNIX

This chapter lists major differences between Oracle Database on Windows and UNIX. For Oracle Database developers and database administrators moving from a UNIX platform to Windows, this information can be helpful in understanding Windows features that are relevant to Oracle Database.

This chapter contains these topics:

Automatic Startup and Shutdown

On UNIX, several files and scripts in different directories are used to start an instance automatically. Other scripts are run on computer shutdown, allowing applications such as Oracle Database to shut down cleanly.

For automatic startup on Windows, set registry parameter ORA_SID_AUTOSTART to true using an Oracle Database tool such as ORADIM. Enter the following with parameters at the command prompt:

C:\> oradim options

To start the listener automatically, set services startup type to automatic.

For automatic shutdown on Windows, set registry parameters ORA_SHUTDOWN and ORA_SID_SHUTDOWN to stop the relevant OracleServiceSID and shut down. Set registry parameter ORA_SID_SHUTDOWNTYPE to control shutdown mode (default is i, or immediate).

See Also:

Background Processing and Batch Jobs

UNIX provides sophisticated control mechanisms for background processing and batch jobs.

For similar functionality on Windows, use the AT command or a GUI version in the Microsoft Resource Kit.

Diagnostic and Tuning Utilities

On UNIX, utilities such as sar and vmstat are used to monitor Oracle Database background and shadow processes. These utilities are not integrated with Oracle Database.

Performance utilities available on Windows include Task Manager, Control Panel, Event Viewer, and Microsoft Management Console.

Oracle Database is integrated with several of these tools. For example:

  • Event Viewer displays system alert messages, including Oracle Database startup/shutdown messages and audit trail.

  • Task Manager on Windows displays currently running processes and their resource usage, similar to the UNIX ps -ef command or HP OpenVMS SHOW SYSTEM. But Task Manager is easier to interpret and the columns can be customized.

    See Also:

Direct Writes to Disk

On both UNIX and Windows platforms, bypassing the file system buffer cache ensures data is written to disk.

On UNIX, Oracle Database uses the O_SYNC flag to bypass the file system buffer cache. The flag name depends on the UNIX port.

On Windows, Oracle Database bypasses the file system buffer cache completely.

Dynamic Link Libraries (DLLs)

Shared libraries on UNIX are similar to shared DLLs on Windows. Object files and archive libraries are linked to generate Oracle Database executables. Relinking is necessary after certain operations, such as installation of a patch.

On Windows, Oracle Database DLLs form part of the executable at run time and are therefore smaller. DLLs can be shared between multiple executables. Relinking by the user is not supported, but executable images can be modified using ORASTACK.

Modifying executable images on Windows reduces the chances of running out of virtual memory when using a large SGA or when supporting thousands of connections. However, Oracle recommends doing this only under the guidance of Oracle Support Services.

Hot Backups

A (manual) hot backup is equivalent to backing up a tablespace that is in offline backup mode.

Backup strategy on UNIX is as follows: put the tablespace into backup mode, copy the files to the backup location, and bring the tablespace out of backup mode.

Windows supports the same backup strategy, but you cannot copy files in use with usual Windows utilities. Use OCOPY to copy open database files to another disk location. Then use a utility to copy the files to tape.

Initialization Parameters: Multiple Database Writers

On UNIX, you can specify many database writer process with initialization parameter DB_WRITERS. Multiple database writers can help, for example, when a UNIX port does not support asynchronous I/O.

DB_WRITERS is supported but typically unnecessary on Windows, which has its own asynchronous I/O capabilities.

See Also:

Chapter 15, "Oracle Database Specifications for Windows"

Installation Accounts and Groups

UNIX uses the concept of a DBA group. The root account cannot be used to install Oracle Database. A separate Oracle Database account must be created manually.

See Also:

Oracle Database Installation Guide

On Windows, Oracle Database must be installed by a Windows username in the Administrators group. The user name is automatically added to the Windows local group ORA_DBA, which receives the SYSDBA privilege. This allows the user to log in to the database using CONNECT / AS SYSDBA and not be prompted for a password.

You can also create an ORA_OPER group to grant SYSOPER privileges to the other Windows users.

Password files are located in the ORACLE_HOME\database directory and are named pwdSID.ora, where SID identifies the Oracle Database instance.

See Also:

Chapter 6, "Administering a Database on Windows"

Installation

The following manual setup tasks, all required on UNIX, are not required on Windows:

  • Set environment variables

  • Create a DBA group for database administrators

  • Create a group for users running Oracle Universal Installer

  • Create an account dedicated to installing and upgrading Oracle Database components

See Also:

Oracle Database Installation Guide for Microsoft Windows

Memory Resources

The resources provided by the UNIX default kernels are often inadequate for a medium or large instance of Oracle Database. The maximum size of a shared memory segment (SHMMAX) and maximum number of semaphores available (SEMMNS) may be too low for Oracle Database recommendations.

On Windows, fewer resources are needed for interprocess communication (IPC), because the Oracle Database relational database management system is thread-based and not process-based. These resources, including shared memory and semaphores, are not adjustable by the user.

Microsoft Transaction Server

Windows coordinates distributed transactions through the Microsoft Distributed Transaction Coordinator (DTC), one of the components of Microsoft Transaction Server. With Oracle Services for Microsoft Transaction Server, you can develop and deploy distributed transaction applications using .NET, COM, or COM+ and Oracle Database can be a resource manager in DTC transactions.

Microsoft Transaction Server is a Windows component that does not run on UNIX. However, Oracle Databases on UNIX can participate in Microsoft DTC transactions on Windows.

See Also:

Oracle Services for Microsoft Transaction Server Developer's Guide for Microsoft Windows

Multiple Oracle Homes and OFA

The goal of OFA is to place all Oracle Database software under one ORACLE_HOME directory and to spread database files across different physical drives as databases increase in size. OFA is implemented on Windows and UNIX in the same way, and main subdirectory and file names are the same on both operating systems. Windows and UNIX differ, however, in their OFA directory tree top-level names and in the way variables are set.

On UNIX, ORACLE_BASE is associated with a user's environment. ORACLE_HOME and ORACLE_SID must be set in system or user login scripts. Symbolic links are supported. Although everything seems to be in one directory on the same hard drive, files may be on different hard drives if they are symbolically linked or have that directory as a mount point.

On Windows, ORACLE_BASE is defined in the registry (for example, in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0). ORACLE_HOME and ORACLE_SIDare variables defined in the registry. Symbolic links like those on UNIX are not supported.

See Also:

Appendix B, "Optimal Flexible Architecture" in Oracle Database Installation Guide for Microsoft Windows

Oracle Home User and Oracle User

On Linux and UNIX systems, you must create and use a software owner user account (oracle), and this user must belong to the Oracle Inventory group (oinstall) and also must be a member of the appropriate OSDBA, OSOPER, OSBACKUPDBA, OSDGDBA, and OSKMDBA groups.

On Windows, you use an existing Windows User Account or create a new standard Windows User Account (not an administrator account) as the Oracle Home User. The various Oracle services on Windows run with the privileges of the Oracle Home User. This user is automatically added to various groups as required.

See Chapter 3, "Supporting Oracle Home User on Windows" for more information.

Processes and Threads

On UNIX, starting with Oracle Database 12c Release 1 (12.1), Oracle Database can use an operating system process or an operating system thread to implement each background task such as database writer (DBW0), log writer (LGWR), shared server process dispatchers, and shared servers. The use of operating system threads instead of processes will allow resource sharing and reduce resource consumption.

On Windows, each background process is implemented as a thread inside a single, large process. For each Oracle Database instance or system identifier, there is one corresponding process for Oracle Database. For example, 100 Oracle Database processes for a database instance on UNIX are handled by 100 threads inside one process on Windows.

All Oracle Database background, dedicated server, and client processes are threads of the master Oracle Database Windows process, and all threads of the Oracle Database process share resources. This multithreaded architecture is highly efficient, allowing fast context switches with low overhead.

To view processes or end individual threads, use Oracle Administration Assistant for Windows. From the Start menu, select All Programs, then select Oracle - HOMENAME, then select Configuration and Migration Tools, and then select Administration Assistant for Windows. Right-click the SIDand choose Process Information.

Note:

Microsoft Management Console (MMC) is started when Oracle Administration Assistant for Windows is started. Oracle Database has integrated several database administration snap-ins into Microsoft Management Console.

See Also:

Raw Partitions

Data files for tablespaces may be stored on a file system or on raw partitions. A raw partition is a portion of a physical disk that is accessed at the lowest possible level.

UNIX supports raw partitions (logical drives). There is no limitation on the number of disk drives.

Windows is limited to using drive letters A-Z, but creating raw partitions lets you bypass the disk drive limitation and divide disks into smaller sections.

Use Windows disk management tools to create an extended partition on a physical drive. An extended partition points to raw space on the disk that can be assigned multiple logical partitions for database files.

An extended partition avoids the four-partition limit on Windows by allowing you to define large numbers of logical partitions to accommodate applications using Oracle Database. Logical partitions can then be given symbolic link names to free up drive letters.

On supported Windows operating systems, create primary partitions and logical drives in extended partitions by selecting the New Simple Volumeoption. To create a raw device, select Do not assign a drive letter or drive path. To mount the raw device, assign and remove a drive letter. Do not use spanned volumes or striped volumes. These options will convert the volume to a dynamic disk. Oracle Automatic Storage Management does not support dynamic disks.

Note:

Oracle RAC is only supported on 64-bit Windows server operating systems.

Services

Windows services are similar to UNIX daemons.

Oracle Database registers a database instance as a service (OracleServiceSID). Services start background processes.

To connect to and use an Oracle Database instance, an Oracle Database service is created during database creation and associated with Oracle Database. Once a service is created with Oracle Database, the service can run even while no user is logged on.

From the Start menu, select Control Panel, then select Administrative Tools, and then select Services to access the Services dialog.

See Also:

Chapter 6, "Administering a Database on Windows"

内容概要:本文详细介绍了如何利用Simulink进行自动代码生成,在STM32平台上实现带57次谐波抑制功能的霍尔场定向控制(FOC)。首先,文章讲解了所需的软件环境准备,包括MATLAB/Simulink及其硬件支持包的安装。接着,阐述了构建永磁同步电机(PMSM)霍尔FOC控制模型的具体步骤,涵盖电机模型、坐标变换模块(如Clark和Park变换)、PI调节器、SVPWM模块以及用于抑制特定谐波的陷波器的设计。随后,描述了硬件目标配置、代码生成过程中的注意事项,以及生成后的C代码结构。此外,还讨论了霍尔传感器的位置估算、谐波补偿器的实现细节、ADC配置技巧、PWM死区时间和换相逻辑的优化。最后,分享了一些实用的工程集成经验,并推荐了几篇有助于深入了解相关技术和优化控制效果的研究论文。 适合人群:从事电机控制系统开发的技术人员,尤其是那些希望掌握基于Simulink的自动代码生成技术,以提高开发效率和控制精度的专业人士。 使用场景及目标:适用于需要精确控制永磁同步电机的应用场合,特别是在面对高次谐波干扰导致的电流波形失真问题时。通过采用文中提供的解决方案,可以显著改善系统的稳定性和性能,降低噪声水平,提升用户体验。 其他说明:文中不仅提供了详细的理论解释和技术指导,还包括了许多实践经验教训,如霍尔传感器处理、谐波抑制策略的选择、代码生成配置等方面的实际案例。这对于初学者来说是非常宝贵的参考资料。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值