banner



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 OracleService SID . 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:

  1. Access your Windows Services dialog.

    Run into Also:

    Your operating system documentation for instructions

  2. Find the service to offset in the list, select it, and click Commencement.

    If you cannot find OracleService SID in the listing, and then use ORADIM to create it.

  3. 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:

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

  2. Correct-click the SID .

    where SID is a specific instance proper noun, such as orcl.

  3. 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 OracleService SID . 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:

  1. Access your Windows Services dialog.

    Run into Also:

    Your operating system documentation for instructions

  2. Select Oracle HOME_NAME TNSListener and click End.

    Oracle HOME_NAME TNSListener is stopped.

  3. Select OracleService SID and click Stop.

  4. Click OK.

    OracleService SID is 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:

  1. From the Offset menu, select Programs, then select Oracle - HOME_NAME, and so select Configuration and Migration Tools so select Assistants Assistant for Windows.

  2. Correct-click the SID .

    where SID is a specific instance proper noun, such as orcl.

  3. 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:

  1. Access your Windows Services dialog.

    See Likewise:

    Your operating arrangement documentation for instructions

  2. Select service OracleServiceSID and click Startup.

  3. Cull Automatic from the Startup Type field.

  4. Click OK.

  5. Click Close to exit the Services dialog.

Oracle Administration Assistant for Windows

To automatically start Oracle Database services from Oracle Administration Assistant for Windows:

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

  2. Right-click the SID .

    where SID is a specific example name, such as orcl.

  3. Choose Startup/Shutdown Options.

  4. Choose the Oracle Service tab.

  5. Choose Automatic in Oracle Service Startup Type.

  6. Click Utilise.

  7. Click OK.

Description of ss_cnfg1.gif follows
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:

  1. Go to your Oracle Database server.

  2. Start SQL*Plus at the command prompt:

    C:\> sqlplus /NOLOG              
  3. Connect to Oracle Database with username SYSDBA:

    SQL> CONNECT / AS SYSDBA              
  4. 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 named init2.ora located in

    C:\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 PFILE is specified, and then the control looks for an SPFILE in ORACLE_HOME \database. If the command finds one, then the command uses it to get-go the database. If information technology does not discover an SPFILE, and then it uses the default initialization parameter file located in ORACLE_BASE \ADMIN\db_name\pfile.

  5. To end a database, enter:

    SQL> SHUTDOWN [fashion]              

    where mode is normal, immediate, or abort.

    In a normal shutdown, 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 firsthand shutdown, Oracle Database terminates and rolls dorsum agile transactions, disconnects clients, and shuts down.

    In an arrest shutdown, 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:

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

  2. Right-click the SID .

    where SID is a specific instance name, such as ORCL.

  3. Cull Startup/Shutdown Options.

  4. Cull the Oracle Instance tab.

  5. Select Get-go upwards instance when service is started, Shut downwards instance when service is stopped, or both.

Description of ss_cnfg2.gif follows
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 _AUTOSTART

    When fix to true, the default value, this parameter causes Oracle Database to start when OracleService SID is started.

  • ORA_ SID _PFILE

    This 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 SPFILE or PFILE from ORACLE_HOME \database.

  • ORA_SHUTDOWN

    When set to true, this parameter enables the selected instance of Oracle Database to be shut down when OracleService SID is stopped. This includes any database in the electric current Oracle home. Default value is false.

  • ORA_ SID _SHUTDOWN

    When gear up to truthful, the default value, this parameter causes the example of Oracle Database identified by the SID value to shut downward when OracleService SID is stopped manually'Äîusing either the Control Panel or Net cease command.

    Circumspection:

    If ORA_SHUTDOWN or ORA_SID_SHUTDOWN is ready to false, 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 _SHUTDOWNTYPE

    This parameter controls database shutdown mode. Set information technology to a (abort), i (immediate), or n (normal). Default mode is i (firsthand) if yous do not set this parameter.

  • ORA_ SID _SHUTDOWN_TIMEOUT

    This parameter sets maximum fourth dimension to wait earlier the service for a detail SID stops.

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

  1. To kickoff the database, commencement OracleService SID .

    This automatically starts ORADIM and issues the -STARTUP command using the initialization parameter file identified past ORA_ SID _PFILE.

  2. To end the database, stop OracleService SID .

    This automatically starts ORADIM, which problems the -SHUTDOWN command in the mode indicated by ORA_ SID _SHUTDOWNTYPE, and shuts downwardly Oracle Database.

    See Also:

    Your operating organisation documentation for instructions on starting and stopping services.

Starting Multiple Instances

  1. Start the service for each instance using ORADIM or the Services dialog of the Command Panel.

  2. At the command prompt set the ORACLE_SID configuration parameter to the SID for the showtime instance to run:

    C:\> SET ORACLE_SID=SID              

    where SID is the proper noun of the Oracle Database example.

  3. Kickoff SQL*Plus:

    C:\> sqlplus /NOLOG              
  4. Connect Every bit SYSDBA:

    SQL> CONNECT / AS SYSDBA              
  5. Kickoff up the outset example:

    SQL> STARTUP PFILE=ORACLE_BASE\admin\db_name\pfile\init.ora              

    where ORACLE_BASE is c:\app\oracle\product\xi.2.0 (unless you inverse it during installation) and db_name is the name of the case.

  6. 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:

  1. Create a password file with the Password Utility:

    C:\> orapwd FILE=PWDsid.ora ENTRIES=max_users              

    where

    • FILE specifies the password file proper noun.

    • SID identifies the database instance.

    • ENTRIES sets 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.

  2. Set up initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE to exclusive, shared, or none.

    The value exclusive specifies that merely one instance tin can use the password file and that the password file contains names other than SYS. In search of the password file, Oracle Database looks in the registry for the value of parameter ORA_SID_PWFILE. If no value is specified, so it looks in the registry for the value of parameter ORA_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 is SYS. Other users cannot log in with SYSOPER or SYSDBA privileges even if those privileges are granted in the password file. The shared value of this parameter affords backward compatibility with earlier Oracle releases. Oracle Database looks for the same files equally it does when the value is sectional.

    The value none specifies that Oracle Database ignores the password file and that hallmark of privileged users is handled by the Windows operating system.

  3. Starting time SQL*Plus:

    C:\> sqlplus /NOLOG              
  4. Connect AS SYSDBA:

    SQL> CONNECT / As SYSDBA              

    For an ASM example, connect AS SYSASM:

    SQL> CONNECT / AS SYSASM              
  5. Outset Oracle Database:

    SQL> STARTUP              
  6. 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 scott to the countersign file and enables scott to connect to the database with SYSDBA privileges. 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

  1. To see the password file, enter:

                      ORACLE_BASE\ORACLE_HOME\database> attrib                

    The password file is displayed every bit PWD sid .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                
  2. To make the password file invisible, enter:

                      ORACLE_HOME\database> attrib +H PWDsid.ora                
  3. To see the outcome of the change, enter:

                      ORACLE_HOME\database> attrib                

    The 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                
  4. 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:

  1. Navigate to directory ORACLE_HOME \database.

  2. Correct-click PWD sid .ora.

  3. Choose Properties.

    The PWD sid .ora Properties dialog opens.

  4. In Attributes, check or clear the checkbox next to Hidden.

  5. Click OK.

To view or hide an invisible password file:

  1. Navigate to directory ORACLE_BASE \ ORACLE_HOME \database.

  2. Choose Folder Options from the View primary menu.

  3. Cull the View tab.

  4. To view an invisible password file, choose Show subconscious files and folders.

  5. To hibernate a visible password file, choose Exercise non prove hidden files and folders.

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

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel