Ian Adam, Saic Ltdavid Stien, Saic Ltd
Translation: Fenng Partii
Database start and close
The database on Windows 2000 can be opened by launching services. By controlling the service options of the panel or by command line mode, such as:
Net Start OracleserviceArtEatei can open the relevant service. This depends on some registry parameters, we discussed later. Stop related services, for example: NET STOP ORACleServiceatei can turn off a database.
On all platforms, Oracle8i instances can start from the service manager (or SQL * plus!) Through the startup command. In UNIX, this command launches the background process and opens the database. It also generated a Unix specific file called $ Oracle_Home / DBS / LK
Similarly, the service manager Server Manager's shutdown command turns off the database on any platform, but it does not stop the service on Windows 2000. It is very likely that the Oracle service is started but the database is turned off.
Automatic start and shutdown on UNIX
On UNIX, Oracle provides DBSTART and DBSHUT scripts for use. In Linux Oracle Detection File / etc / ORATAB to determine which database automatically start / close. In Solaris (and some other versions of UNIX), check the / var / opt / oracle / ORATAB file. Note: The 8.1.6 version of DBStart has a bug, which has been fixed in 8.1.7, see [7 MetAlink, 2000] has a detailed description.
On Linux, as root users, create a file called DBORA in the /etc/rc.d/init.d directory. This file will check if the parameter is 'Start' or 'Stop' and perform DBStart / DBSHUT appropriately; usually starts Listener from this script. Regenerated into two symbols linkable /etc/rc.d/rc2.d/s99dbora and /etc/rc.d/rc0.d/k10dbora. The database is launched via /etc/rc.d/rc2.d/s99dbora while running level 2 (multi-user), shutting down the database via /etc/rc.d/rc0.d/k10dbora when the system is turned off. On Solaris, this script is in /etc/init.d is not in /etc/rc.d/init.d.
Note that the default DBSHUT performs a normal (Normal) shutdown operation. The closing mode of the database can be changed by editing this line in $ ORACLE_HOME / BIN / DBSHUT in UNIX.
Modify ShutDown into shutdown immediate
If you start a running instance, DBSTART will execute a shutdown abort. At the top of the DBStart Script script, the 'IT Should Only Be Executed As Part of The System Boot Procedure'. This script is often copied, modified, so use in other times to be safe enough. Automatic startup and shutdown on Windows 2000
In previous versions (8i), when Oracle's startup is processed by an additional service Oraclestartsid, Oracle cannot be turned off when the server is started and closed. Starting from Oracle8i, the STOP / START function has become the main Oracle service and controls through registry. Note When ORADIM is used to create or modify an instance, the automatic setting these values are set in the registry. These settings are at the HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE / HOMEID key value.
The ID number starts from 0, and every additional Oracle Home is incremented.
-------------------------------------------------- ---------------Parameter Description--------------------------------- -------------------------------- ORA_SID_AUTOSTART is set to true (default), start the database when ORACleSERVICESID starts . ORA_SID_PFILE Sets the full path to the init.ora parameter file. ORA_SHUTDOWN When set to True, any database under any Oracle Home will shutddown. When ORA_SID_SHUTDOWN is set to True, turn off the Oracle8i database of the marker SID value. -------------------------------------------------- --------------- If the shutdown parameter is set to false, stop the OraclesRVicesID will closing the instance in the way, and instance recovery is required next time.
The following optional parameters can be set to a suitable value in the registry.
-------------------------------------------------- ---------------Parameter Description--------------------------------- ------------------------------ ORA_SID_SHUTDOWNTYPE Indicates that the database is closed mode Aabort,
I (Immediate), N (Normal). If you don't set this parameter, the default mode is i (immediate). ORA_SID_SHUTDOWN_TIMEOUT Wait for the maximum time to wait in a SID. -------------------------------------------------- ---------------
Operating system certification
OS certification is similar in two platforms, setting an OS_AUTHENT_PREFIX parameter in the parameter file, and creates a user or marked as externally. Creating a user in Windows2000 wants to specify the domain name and username to be in "", otherwise it will not work. If you set OSAUTH_PREFIX_DOMAIN to false in the registry, you can ignore the drop. The machine and server machine also need to include SQL NET.AUTHENTICATION_SERVICES = (NTS) in SQLNET.AUTHENTICATION_SERVICES = (NTS). In Windows 2000, a domain user can be allowed to log in to a remote PC without providing additional passwords. See [2K ELLY III, 2000] can be detailed.
Listener
The listener is implemented as a service on Windows 2000, so Listener can start by launching OracleTNSListener services. Listener on both platforms can be controlled from the lsnrctl command. LSNRCTL Start launched on UNIX; starting OracleTnsListener service in Windows 2000. If Listener is started for the first time, there is no OracletNSListener service will create it. If you remove Oracle from your computer, the Listener service is handmade from the registry. Listener on both platforms can monitor different versions of the database. In WIN2000, no Oracle_home parameters are required in Listener.ora (in Unix), because each SID is unique in Server. Listener can get the correct oracle_home from the registry.
Oracle8i has a feature called server registration, and PMON automatically registers information for Listener. This means that Net8 Listener can monitor a database without setting up in the listener.ora file. However, if this is, Enterprise Manager can connect to the database until startup. So this example cannot be used to initiate a remote instance. All instances are typically set in Listener.ora to avoid conflicts, especially in a site with multiple DBAs, can avoid the Enterprise Manager problem we mentioned.
Extended SID name
The Oracle 7 instance name on Windows NT has four character restrictions, which may have a very embarrassing instance name - Fortunately, the SID name is longer in 8i. However, it is not always useful to use too long instance names in several occasions including naming services. There is a bug on Windows 2000, which limits the instance name for up to 15 characters.
-------------------------------------------------- -------------- UNIX NT ---------------------------------- ------------------------------ Database name instance name database name instance name ------------ -------------------------------------------------- --Oracle7 8 8 4Oracle8 8 8 4 4Oracle8i 8 64 8 64 ----------------------------------- -----------------------------
Database creation
When you choose to create an Oracle 8i database during the installation process, the database generation assistant will automatically run through Oracle Universal Installer. It can also be operated manually as a separate tool after installation. With it, you can manually input SID instead of the default ORCL. In the default, the database is not created under Oracle_home, fully follow the intention of the OFA. It is recommended that you run the Database Creation Assistant, but select Save Information to A Batch File on the last page (saving information into a batch file), then click the "Finish" button. This will generate a few scripts. Comparing their content from different platforms. The content on UNIX and Windows is very similar, except for the call to ORADIM on Windows. The first time the call has created an Oracle service associated with the Oracle database:
D: / ORACLE / ORA817 / BIN / ORADIM -NEW -SID ATEI -INTPWD man -startmode manual -pfile "d: /oracle/admin/atei/pfile/initatei.ora"
The second time for ORADIM changes to automatic start:
D: / Oracle / Ora817 / Bin / ORADIM -EDIT -SID ATEI -STARTMODE AUTO
These files can be used as a template for creating other databases. If you don't use the above recommended way to create a database, the files and directories generated by Database Creation Assistant have no big use. These files and directories cannot be created before using these scripts created additional databases. Special note, the script assumes that a password file already exists, the password file can be prepared to build [2 H Kelly III, 2000] with ORAPWD 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 / eleghti
Oracle_Base / ORADATA / ATEI / ARCHIVE
$ Oracle_base / oradata / eleghti / archive
Oracle_Base / Admin / ATEI
$ Oracle_Base / Admin / Eighti
Also these subfolders
SADHOC BDUMP CDUMP CREATE EXP PFILE UDUMP
Create / change files with 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 / INITEI.ORA
$ Oracle_base / admin / eleghti / pfile / initeighti.ora
Oracle_Home / Database / INITEI. ORA
A line
IFILE = 'D: /oracle/admin/atei/pfile/initatei.ora'
$ Oracle_home / dbs / initeighti.ora
Symbol links to:
/db01/app/oracle/admin/eighti/pfile/initeighti.ora
Add to TNSNAMES. ORA Entry to TNSNames.ora
Adding to Listener.ora
Adding to Listener.ora
Windows has no relevant operations
Add a project to ORATAB
Scripts created by Database Creation Assistant:
WINDOWS 2000
Unix
Comment
Atei.bat
Eighti
Call other scripts, or call ORADIM on Windows
Ateirun.sql
EIGHTIRUN.SH
Contains the statement that creates a database
Ateirun1.sql
EIGHTIRUN1.SH
Create a tablespace / create a rollover segment
Do not create the second return segment in the system
N / a
EIGHTIRUN2.SH
Additional scripts (such as CatProc), these run from ateirun1.sql on Windows
Ateisqlplus.sql
EightiSqlplus.sh
Add SQL * PLUS Help
@c: /oracle/ora817/sqlplus/admin/help/helpbld.sql helpus.sql
AteialTertablespace.sql
EIGHTIALTERTABLESPACE.SH
Change the default and temporary table space for system users
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
Various scripts, only when you select the appropriate options.
Remotely mounted file systems, such as NFS and Windows 2000 on UNIX, are not supported on both platforms.