How To Create Oracle Service In Windows Manually
5 Administering a Database on Windows
This chapter describes how to administer Oracle Database for Windows.
This affiliate contains these topics:
-
Managing Oracle Database Services
-
Starting and Shutting Down a Database with SQL*Plus
-
Starting and Shutting Downward a Database Using Services
-
Starting Multiple Instances
-
Creating and Populating Password Files
-
Connecting Remotely to the Database as SYS
-
Automatically Encrypted Database Passwords
-
Archiving Redo Log Files
Managing Oracle Database Services
This section tells you how to manage the services that Oracle Database installs on your computer.
This department provides information on the following:
-
Oracle Database Service Naming Conventions for Multiple Oracle Homes
-
Starting Oracle Database Services
-
Stopping Oracle Database Services
-
Motorcar-starting Oracle Database Services
Oracle Database Service Naming Conventions for Multiple Oracle Homes
Oracle Database for Windows lets y'all have multiple Oracle homes on a single computer. This feature, described in Appendix B, "Optimal Flexible Architecture", in Oracle Database Installation Guide for Microsoft Windows, affects Oracle services naming conventions. As you perform installations into Oracle home directories:
-
You must have default Oracle home name provided or specify a dissimilar proper noun for each Oracle dwelling house directory.
-
You are prompted to give a system identifier and global database name for each database installation.
Starting Oracle Database Services
Oracle Database services must exist started for you to use Oracle Database and its products. You can starting time Oracle Database services from iii unlike locations:
-
Command Panel
-
Command Prompt
-
Oracle Assistants Banana for Windows
Note:
You can start Oracle Database when yous start
OracleServiceSID. Meet "Starting and Shutting Down a Database Using Services" for data on registry parameters that enable you to do this.
Control Panel
To start Oracle Database services from the Command Console:
-
Access your Windows Services dialog.
Run into Also:
Your operating system documentation for instructions
-
Find the service to offset in the list, select it, and click Commencement.
If you cannot find
OracleServiceSIDin the listing, and then use ORADIM to create it. -
Click Close to exit the Services dialog.
Command Prompt
To start Oracle Database services from the command prompt, enter:
C:\> Net START service where service is a specific service name, such as OracleServiceORCL.
Oracle Administration Assistant for Windows
To start Oracle Database services from Oracle Administration Assistant for Windows:
-
From the Start menu, select Programs, then select Oracle - HOME_NAME, so select Configuration and Migration Tools and and so select Administration Assistant for Windows.
-
Correct-click the
SID.where
SIDis a specific instance proper noun, such asorcl. -
Click First Service.
This starts service
OracleServiceORCL.
Stopping Oracle Database Services
On occasion (for example, when re-installing Oracle Database), you must end Oracle Database services. You can cease Oracle Database services from three different locations:
-
Command Panel
-
Command Prompt
-
Oracle Assistants Banana for Windows
Annotation:
You can stop Oracle Database in normal, firsthand, or abort fashion when you end
OracleServiceSID. See "Starting and Shutting Down a Database Using Services" for information on registry parameters that enable yous to do this.
Command Panel
To cease Oracle Database services from the Control Panel:
-
Access your Windows Services dialog.
Run into Also:
Your operating system documentation for instructions
-
Select
OracleHOME_NAMETNSListenerand click End.OracleHOME_NAMETNSListeneris stopped. -
Select
OracleServiceSIDand click Stop. -
Click OK.
OracleServiceSIDis stopped.
Command Prompt
To terminate Oracle Database services from the control prompt, enter:
C:\> internet STOP service where service is a specific service name, such every bit OracleServiceORCL.
Oracle Administration Assistant for Windows
To stop Oracle Database services from Oracle Administration Assistant for Windows:
-
From the Offset menu, select Programs, then select Oracle - HOME_NAME, and so select Configuration and Migration Tools so select Assistants Assistant for Windows.
-
Correct-click the
SID.where
SIDis a specific instance proper noun, such asorcl. -
Click Stop Service.
This stops service OracleServiceORCL.
Automobile-starting Oracle Database Services
Oracle Database services can exist gear up to start automatically whenever the Windows reckoner is restarted. You can turn machine-start on or off from ii different locations:
-
Control Panel
-
Oracle Administration Banana for Windows
Control Panel
To utilize the Command Console to configure when and how Oracle Database is started:
-
Access your Windows Services dialog.
See Likewise:
Your operating arrangement documentation for instructions
-
Select service OracleServiceSID and click Startup.
-
Cull Automatic from the Startup Type field.
-
Click OK.
-
Click Close to exit the Services dialog.
Oracle Administration Assistant for Windows
To automatically start Oracle Database services from Oracle Administration Assistant for Windows:
-
From the Start menu, select Programs, and so select Oracle - HOME_NAME, then select Configuration and Migration Tools and then select Administration Assistant for Windows.
-
Right-click the
SID.where
SIDis a specific example name, such asorcl. -
Choose Startup/Shutdown Options.
-
Choose the Oracle Service tab.
-
Choose Automatic in Oracle Service Startup Type.
-
Click Utilise.
-
Click OK.
Description of the illustration ss_cnfg1.gif
Starting and Shutting Downwardly a Database with SQL*Plus
These instructions assume that a database instance has been created.
To get-go or close downwardly Oracle Database:
-
Go to your Oracle Database server.
-
Start SQL*Plus at the command prompt:
C:\> sqlplus /NOLOG
-
Connect to Oracle Database with username SYSDBA:
SQL> CONNECT / AS SYSDBA
-
To get-go a database, enter:
SQL> STARTUP [PFILE=path\filename]
This command uses the initialization parameter file specified in
path\filename. To get-go a database using a file namedinit2.oralocated inC:\app\oracle\production\11.2.0\admin\orcl\pfile
you would enter:
SQL> STARTUP PFILE=C:\app\oracle\product\xi.2.0\admin\orcl\pfile\init2.ora
If no
PFILEis specified, and then the control looks for anSPFILEinORACLE_HOME\database. If the command finds one, then the command uses it to get-go the database. If information technology does not discover anSPFILE, and then it uses the default initialization parameter file located inORACLE_BASE\ADMIN\db_name\pfile. -
To end a database, enter:
SQL> SHUTDOWN [fashion]
where mode is
normal,immediate, orabort.In a
normalshutdown, Oracle Database waits for all currently-connected users to disconnect and disallows any new connections earlier shutting down. This is the default manner.In an
firsthandshutdown, Oracle Database terminates and rolls dorsum agile transactions, disconnects clients, and shuts down.In an
arrestshutdown, Oracle Database terminates agile transactions and disconnects users; it does not roll dorsum transactions. The database performs automated recovery and rollback the adjacent fourth dimension information technology is started. Use this mode just in emergencies.Run across Also:
Chapter two, "Database Tools on Windows" for a listing of other tools that can first Oracle Database and this guide for information on options you can specify when starting your database.
Starting and Shutting Down a Database Using Services
You lot can start or close down Oracle Database by starting or stopping service OracleService SID in the Control Panel. Starting OracleService SID is equivalent to using the STARTUP command or manually inbound:
C:\> oradim -STARTUP -SID SID [-STARTTYPE srvc | inst | srvc,inst] [-PFILE filename | -SPFILE] Stopping OracleService SID is equivalent to using the SHUTDOWN command or manually entering:
C:\> oradim -SHUTDOWN -SID SID [-SHUTTYPE srvc | inst | srvc,inst] [-SHUTMODE normal | immediate | abort] You can enable starting and stopping Oracle Database through OracleService SID two dissimilar ways:
-
Oracle Administration Assistant for Windows
-
Setting Registry Parameters
Oracle Administration Assistant for Windows
To showtime or stop a database using Oracle Database services from Oracle Administration Banana for Windows:
-
From the Beginning menu, select Programs, and so select Oracle - HOME_NAME, and then select Configuration and Migration Tools and then select Administration Assistant for Windows.
-
Right-click the
SID.where
SIDis a specific instance name, such asORCL. -
Cull Startup/Shutdown Options.
-
Cull the Oracle Instance tab.
-
Select Get-go upwards instance when service is started, Shut downwards instance when service is stopped, or both.
Description of the analogy ss_cnfg2.gif
Setting Registry Parameters
To start or stop Oracle Database through Oracle Database Services, set up the following registry parameters to the indicated values:
-
ORA_SID_AUTOSTARTWhen fix to
true, the default value, this parameter causes Oracle Database to start whenOracleServiceSIDis started. -
ORA_SID_PFILEThis parameter sets the full path to the initialization parameter file. If this entry is not present, and then oradim will try to offset the database with an
SPFILEorPFILEfromORACLE_HOME\database. -
ORA_SHUTDOWNWhen set to
true, this parameter enables the selected instance of Oracle Database to be shut down whenOracleServiceSIDis stopped. This includes any database in the electric current Oracle home. Default value isfalse. -
ORA_SID_SHUTDOWNWhen gear up to
truthful, the default value, this parameter causes the example of Oracle Database identified by theSIDvalue to shut downward whenOracleServiceSIDis stopped manually'Äîusing either the Control Panel or Net cease command.Circumspection:
If
ORA_SHUTDOWNorORA_SID_SHUTDOWNis ready tofalse, then manually shutting downwardly OracleServiceSID will however shut down Oracle Database. But it will be an abnormal shutdown, and Oracle does non recommend it.
The post-obit two registry parameters are optional:
-
ORA_SID_SHUTDOWNTYPEThis parameter controls database shutdown mode. Set information technology to
a(abort),i(immediate), orn(normal). Default mode isi(firsthand) if yous do not set this parameter. -
ORA_SID_SHUTDOWN_TIMEOUTThis parameter sets maximum fourth dimension to wait earlier the service for a detail
SIDstops.
The registry location of these required and optional parameters is determined by the number of Oracle home directories on your computer. If you take simply one Oracle habitation directory, then these parameters belong in:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0
If yous accept multiple Oracle habitation directories, then these parameters belong in:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HabitationID where ID is incremented for each additional Oracle home directory on your computer.
Note:
If you use ORADIM to create or edit instances, and then it automatically sets the relevant registry parameters to their appropriate values.
Starting or Stopping OracleService SID from the Control Panel
-
To kickoff the database, commencement OracleService
SID.This automatically starts ORADIM and issues the -
STARTUPcommand using the initialization parameter file identified pastORA_SID_PFILE. -
To end the database, stop OracleService
SID.This automatically starts ORADIM, which problems the
-SHUTDOWNcommand in the mode indicated byORA_SID_SHUTDOWNTYPE, and shuts downwardly Oracle Database.See Also:
Your operating organisation documentation for instructions on starting and stopping services.
Starting Multiple Instances
-
Start the service for each instance using ORADIM or the Services dialog of the Command Panel.
-
At the command prompt set the
ORACLE_SIDconfiguration parameter to theSIDfor the showtime instance to run:C:\> SET ORACLE_SID=SIDwhere
SIDis the proper noun of the Oracle Database example. -
Kickoff SQL*Plus:
C:\> sqlplus /NOLOG
-
Connect
Every bitSYSDBA:SQL> CONNECT / AS SYSDBA
-
Kickoff up the outset example:
SQL> STARTUP PFILE=ORACLE_BASE\admin\db_name\pfile\init.orawhere
ORACLE_BASEisc:\app\oracle\product\xi.2.0(unless you inverse it during installation) anddb_nameis the name of the case. -
Repeat Steps 2-5 for the other instances to run.
Creating and Populating Password Files
Use Password Utility to create countersign files. Password Utility is automatically installed with Oracle Database utilities. Password files are located in directory ORACLE_HOME \database and are named PWD sid .ora, where SID identifies the Oracle Database instance. Password files tin can be used for local or remote connections to Oracle Database.
To create and populate a password file:
-
Create a password file with the Password Utility:
C:\> orapwd FILE=PWDsid.ora ENTRIES=max_users
where
-
FILEspecifies the password file proper noun. -
SIDidentifies the database instance. -
ENTRIESsets maximum number of entries in countersign file. This corresponds to maximum number of distinct users immune to connect to the database simultaneously with either the SYSDBA or the SYSOPER DBA privilege.
-
-
Set up initialization parameter file parameter
REMOTE_LOGIN_PASSWORDFILEtoexclusive,shared, ornone.The value
exclusivespecifies that merely one instance tin can use the password file and that the password file contains names other thanSYS. In search of the password file, Oracle Database looks in the registry for the value of parameterORA_SID_PWFILE. If no value is specified, so it looks in the registry for the value of parameterORA_PWFILE, which points to a file containing usernames, passwords, and privileges. If that is not ready, then it uses the default:ORACLE_HOME\DATABASE\PWDsid.ORA.The default value is
shared. It specifies that multiple instances (for case, an Oracle RAC environment) tin can use the password file. Yet, the but user recognized by the password file isSYS. Other users cannot log in withSYSOPERorSYSDBAprivileges even if those privileges are granted in the password file. Thesharedvalue of this parameter affords backward compatibility with earlier Oracle releases. Oracle Database looks for the same files equally it does when the value issectional.The value
nonespecifies that Oracle Database ignores the password file and that hallmark of privileged users is handled by the Windows operating system. -
Starting time SQL*Plus:
C:\> sqlplus /NOLOG
-
Connect
AS SYSDBA:SQL> CONNECT / As SYSDBA
For an ASM example, connect
AS SYSASM:SQL> CONNECT / AS SYSASM
-
Outset Oracle Database:
SQL> STARTUP
-
Grant appropriate privileges to each user. Users who must perform database administration, for example, would be granted privilege
SYSDBA:SQL> GRANT SYSDBA TO db_administrator;
For an ASM case:
SQL> GRANT SYSASM TO SYS;
If the grant is successful, then the post-obit bulletin displays:
Argument Processed.
This adds
scottto the countersign file and enablesscottto connect to the database withSYSDBAprivileges. Use SQL*Plus to add or delete usernames, user passwords, and user privileges in password files.Caution:
Copying or manually moving password files may consequence in ORADIM being unable to find a password to beginning an instance.
Viewing and Hiding the Password File
The password file is not automatically hidden. It can be fabricated invisible and visible once again from two unlike locations:
-
Control Prompt
-
Windows Explorer
Note:
The password file must exist visible before it tin can be moved, copied, or deleted.
Command Prompt
-
To see the password file, enter:
ORACLE_BASE\ORACLE_HOME\database> attrib
The password file is displayed every bit
PWDsid.ora:A ORACLE_HOME\database\oradba.exe A ORACLE_HOME\database\oradim.log A ORACLE_HOME\database\PWDsid.ora A ORACLE_HOME\database\SPFILEsid.ora
-
To make the password file invisible, enter:
ORACLE_HOME\database> attrib +H PWDsid.ora
-
To see the outcome of the change, enter:
ORACLE_HOME\database> attribThe password file is now subconscious:
A ORACLE_HOME\database\oradba.exe A ORACLE_HOME\database\oradim.log A H ORACLE_HOME\database\PWDsid.ora A ORACLE_HOME\database\SPFILEsid.ora
-
To brand the countersign file visible again, enter:
ORACLE_HOME\database> attrib -H PWDsid.ora
Windows Explorer
To make the password file invisible or visible again:
-
Navigate to directory
ORACLE_HOME\database. -
Correct-click PWD sid .ora.
-
Choose Properties.
The
PWDsid.oraProperties dialog opens. -
In Attributes, check or clear the checkbox next to Hidden.
-
Click OK.
To view or hide an invisible password file:
-
Navigate to directory
ORACLE_BASE\ORACLE_HOME\database. -
Choose Folder Options from the View primary menu.
-
Cull the View tab.
-
To view an invisible password file, choose Show subconscious files and folders.
-
To hibernate a visible password file, choose Exercise non prove hidden files and folders.
-
Click OK.
Connecting Remotely to the Database as SYS
When connecting to the starter database from a remote computer every bit SYS, you lot must use a different password from the 1 described in Oracle Database Installation Guide for Microsoft Windows when logging on with SYSDBA privileges. This is because the password file enables database access in this situation and it requires the password oracle for this purpose.
Automatically Encrypted Database Passwords
With Oracle Database, the password used to verify a remote database connection is automatically encrypted. Whenever a user attempts a remote login, Oracle Database encrypts the password before sending it to the remote database. If the connection fails, and then the failure is noted in the operating organization audit log.
Archiving Redo Log Files
If you installed Oracle Database through the Typical installation, then it is created in NOARCHIVELOG style. If yous created your database through the Custom option of Database Configuration Banana, then y'all had the option of either ARCHIVELOG or NOARCHIVELOG.
In NOARCHIVELOG mode, redo logs are not archived. Setting your archive mode to ARCHIVELOG and enabling automatic archiving causes redo log files to be archived. This protects Oracle Database from both instance and disk failure.
Source: https://docs.oracle.com/cd/E11882_01/win.112/e10845/admin.htm
Posted by: yatestraid1937.blogspot.com

0 Response to "How To Create Oracle Service In Windows Manually"
Post a Comment