Oracle differences on UNIX and WINDOWS2000 Partii

Source: Internet
Author: User
Tags contains connect rollback versions name database oracle database metalink linux
Oracle|unix|window


Ian Adam, SAIC Ltd
David Stien,saic LTD

Translation: Fenng
Partii

Database Startup and shutdown

The database can be opened on Windows 2000 by starting the associated service. Through the service options of the Control Panel or through command-line mode, such as:

net start Oracleserviceatei can open related services. This depends on some registry parameters, which we'll discuss later. Stop related services, such as: net stop Oracleserviceatei can close a database.

On all platforms, the Oracle8i instance can be started by using the startup command from the Service Manager (or sql*plus!). In Unix, this command initiates the background process and opens the database. It also generates a UNIX-specific file called $oracle_home/dbs/lk<dbname&gt, which is a mount lock file [6 Metalink, 2000]. This prevents two instances from being mount on the same database and uses different oracle_sid in the mode of not using a parallel server. It turns out that this is a 0-length file, but now contains the text ' Do not DELETE this file! '. Don't try to see if the database is available by looking at the file, it's not very accurate. In Windows 2000, the startup command does not start the Oracle service, but this opens the database if the service is already running.

Similarly, the shutdown command of Service Manager Server Manager shuts down the database on any platform, but it does not stop the service on Windows 2000. It is quite possible that the Oracle service was started but the database was turned off.


Automatic startup and shutdown of databases on Unix

On UNIX, ORACLE provides dbstart and Dbshut scripts for use. In Linux
The Oracle detection file/etc/oratab to determine which database is automatically started/shutdown. In Solaris (and some other versions of Unix), check the/var/opt/oracle/oratab file. Note that the 8.1.6 version of Dbstart has a bug that has been repaired in 8.1.7 and has been described in detail in [7 Metalink, 2000].

On Linux, as the root user, create a file named Dbora in the/ETC/RC.D/INIT.D directory. This file will check whether the parameter is ' start ' or ' stop ' and perform the dbstart/dbshut appropriately, and usually start the listener from this script. Generate two symbolic joins again
/etc/rc.d/rc2.d/s99dbora and
/etc/rc.d/rc0.d/k10dbora. The database passes/etc/rc.d/rc2.d/s99dbora at run Level 2 (multiuser)
Boot, shut down the database by/etc/rc.d/rc0.d/k10dbora when the system shuts down to run level 0
。 On Solaris, this script is in/ETC/INIT.D rather than in/ETC/RC.D/INIT.D.

Be aware that the default Dbshut performs a normal shutdown operation. In Unix, you can change the shutdown mode of a database by editing this line in $oracle_home/bin/dbshut.

Put
Shutdown
Modified into
Shutdown immediate

If you start an instance that is already running, Dbstart also executes a shutdown abort. At the top of the Dbstart script scripts, It is warned that ' It should only is executed as part of the system boot procedure '. This script is often copied and modified so that it can be used at other times to be safe enough.


Automatic startup and shutdown of databases on WINDOWS 2000

In previous versions (8i), Oracle could not be automatically and cleanly switched off when the launch of Oracle was handled by an additional service Oraclestartsid and the server was started and shut down. Starting with oracle8i, the Stop/start function became the primary Oracle service and was controlled through the registry. Note that when Oradim is used to create or modify instances, these values are automatically set in the registry. These settings are under the HKEY_LOCAL_MACHINE Oftware\oracle\homeid key value.

The ID number starts at 0, each with an additional Oracle home increment.

-----------------------------------------------------------------
Parameter description
-----------------------------------------------------------------
When the Ora_sid_autostart is set to True
(default), start data when Oracleservicesid is started
Library.
Ora_sid_pfile sets the full path of the Init.ora parameter file.
Ora_shutdown when set to true, at any current Oracle
Any database under home will be shutdown.
When Ora_sid_shutdown is set to True, close the Oracle8i database that marks the SID value.
-----------------------------------------------------------------
If
Shutdown parameter is set to False, Oracleservicesid will close the instance abort the next time it starts
Time to perform an instance recovery.


The following optional parameter can be set to the appropriate value in the registry

-----------------------------------------------------------------
Parameter description
-----------------------------------------------------------------Ora_sid_shutdowntype indicates the database shutdown mode aabort),

I (immediate), N (normal).
If you don't set this argument,
The default mode is I (immediate).
Ora_sid_shutdown_timeout the maximum time to wait before a SID stops.
-----------------------------------------------------------------



Operating system Certification

OS authentication is similar between two platforms, set os_authent_prefix in the parameter file
parameter, the creation user is marked as externally. Create a domain name in Windows2000 that you want to specify uppercase and the user name to be in "", otherwise it will not work. If you set Osauth_prefix_domain to False in the registry, you can ignore the domain. The client and server machines also need to include the SQL net.authentication_services= (NTS) line in Sqlnet.ora.

In Windows 2000, you can allow a domain user to log on to a remote PC and connect to the database without providing additional passwords. See [2 K Elly iii,2000] to get the details.


LISTENER

Listener is implemented as a service on Windows 2000, so listener can be started by starting the Oracletnslistener service. Listener can be controlled from the LSNRCTL command on both platforms. On Unix lsnrctl start starts the listener process;
2000 Starting the Oracletnslistener service is OK. If listener does not have the Oracletnslistener service to create it the first time it starts. If you remove Oracle from your computer, the listener service is manually removed from the registry.

Listener on two platforms can listen to different versions of the database. In the Win2000,
Oracle_home parameters (to be used in Unix) are not required in Listener.ora, because each SID is unique within the server. Listener can get the correct oracle_home from the registry.

Oracle8i has a feature called Server registration, Pmon Automatic registration of listener information. This means that Net8 listener can listen to a database without having to set it up in Listener.ora files. In doing so, however, Enterprise Manager will not be able to connect to the database until it is started. So this example cannot be used to start a remote instance. It is usually best to set all instances in Listener.ora to avoid conflicts, especially in a site with multiple DBAs, to avoid the Enterprise Manager problem we mentioned.


The extended SID name

The Oracle 7 instance name on Windows NT is limited to 4 characters long, which can produce an obscure instance name-thankfully, the SID name has been lengthened in 8i. However, it is not always useful to use an instance name that is too long in several situations that include naming services. There is a bug on Windows 2000 that restricts the instance name to a maximum of 15 characters.

----------------------------------------------------------------
Unix NT
----------------------------------------------------------------
Database name Instance name Database name Instance Name
----------------------------------------------------------------
ORACLE7 8 8 8 4
ORACLE8 8 8 8 4
Oracle8i 8 64 8 64
----------------------------------------------------------------


The creation of a database

When you choose to create an Oracle 8i database during the installation process, the database generation Assistant passes Oracle Universal Installer
Run automatically. It can also be run manually as a separate tool after installation. It also allows you to manually enter the SID instead of the default ORCL, by default, not creating a database under Oracle_home, completely following OFA's intent.

It is recommended that you run database creation Assistant, but on the last page select Save information to a batch file (save the information to a batch file), and then click the "Finish" button. This will produce several scripts. It's interesting to compare their content from different platforms. In Unix and
The content on Windows is very similar, except for Oradim calls on Windows. The first call to it resulted in an Oracle service associated with an Oracle database:

D:\ORACLE\Ora817\bin\oradim-new-sid atei-intpwd Man-startmode Manual-pfile
"D:\ORACLE\admin\atei\pfile\initatei.ora"

The second call to Oradim changes the service to start automatically:

D:\ORACLE\Ora817\bin\oradim-edit-sid Atei-startmode Auto

You can use these files as templates for creating other databases. These files and directories generated by database creation Assistant are of little use if you do not create a database in the way suggested above. These files and directories must not be created until you use these scripts to create additional databases. Specifically, the script assumes that a password file already exists and that the password file can be orapwd with the command [2 H Kelly III, 2000].




Directory created by Database creation Assistant:

Windows 2000

Oracle_base = D:\oracle

Unix

Oracle_base =/db01/app/oracle

Oracle_base\oradata\atei

$ORACLE _base/oradata/eighti

Oracle_base\oradata\atei\archive

$ORACLE _base/oradata/eighti/archive

Oracle_base\admin\atei

$ORACLE _base/admin/eighti

and those subfolders.

Sadhoc bdump cdump Create exp pfile udump




Files created/altered through the database Creation Assistant:

Windows 2000

Oracle_home = D:\oracle\ora817

Unix

Oracle_home =/db01/app/oracle/product/8.1.7

Oracle_home\database\pwdatei.ora

$ORACLE _home/dbs/orapweighti.ora

Oracle_base\admin\atei\pfile\initatei.ora

$ORACLE _base/admin/eighti/pfile/initeighti.ora

Oracle_home\database\initatei.ora

Contains one row

Ifile= ' D:\oracle\admin\atei\pfile\initatei.ora '

$ORACLE _home/dbs/initeighti.ora

Symbol link to:

/db01/app/oracle/admin/eighti/pfile/initeighti.ora

Entries added to Tnsnames.ora

Entries added to Tnsnames.ora

Entries added to Listener.ora

Entries added to Listener.ora

Windows does not have a related operation

Add Items to Oratab

Scripts created through the database Creation Assistant:

Windows 2000

Unix

Comments

Atei.bat

Eighti

Calling other scripts, you can also call Oradim on Windows

Ateirun.sql

eightirun.sh

Contains statements to create a database

Ateirun1.sql

eightirun1.sh

Create a table space/create a rollback segment

Do not create a second rollback segment in the system

N/A

eightirun2.sh

Additional scripts (e.g., Catproc),
These are run from Ateirun1.sql on Windows

Ateisqlplus.sql

eightisqlplus.sh

Add Sql*plus Help

@c:\oracle\ora817 Qlplus\admin\help\helpbld.sql Helpus.sql

Ateialtertablespace.sql

eightialtertablespace.sh

Change the default and temporary tablespace for the system user



Ateireplicate.sql

Ateijava.sql

Ateiordinst.sql

Ateiimedia.sql

Ateidrsys.sql

Ateicontext.sql

Ateispatial1.sql

Ateitimeseries.sql

Ateivirage.sql

eightireplicate.sh

eightijava.sh

eightiordinst.sh

eightiimedia.sh

eightidrsys.sh

eighticontext.sh

eightispatial1.sh

eightitimeseries.sh

eightivirage.sh

Scripts that are generated only when you select the appropriate option.


Remote-attached file systems, such as NFS on UNIX and Windows 2000 UNC, are not supported on two platforms.



Related Article

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.