banner



How To Start Oracle Database In Windows 7

v Administering a Database on Windows

This chapter describes how to administer Oracle Database for Windows.

This chapter contains these topics:

  • Managing Oracle Database Services

  • Starting and Shutting Down a Database with SQL*Plus

  • Starting and Shutting Down a Database Using Services

  • Starting Multiple Instances

  • Creating and Populating Password Files

  • Connecting Remotely to the Database as SYS

  • Automatically Encrypted Database Passwords

  • Creating Control, Information, and Log Files on Remote Computers

  • Archiving Redo Log Files

  • Backing Up an Oracle Database on Windows

5.one Managing Oracle Database Services

This section tells you lot how to manage the services that Oracle Database installs on your computer.

This section provides information on the following:

  • Oracle Database Service Naming Conventions for Multiple Oracle Homes

  • Starting Oracle Database Services

  • Stopping Oracle Database Services

  • Auto-starting Oracle Database Services

5.ane.1 Oracle Database Service Naming Conventions for Multiple Oracle Homes

Oracle Database for Windows lets yous have multiple Oracle homes on a single computer. This feature, described in Appendix B, "Optimal Flexible Architecture", in Oracle Database Installation Guide for Windows, affects Oracle services naming conventions. As you lot perform installations into Oracle home directories:

  • Y'all must accept default Oracle home name provided or specify a different name for each Oracle dwelling house directory.

  • You are prompted to give a system identifier and global database name for each database installation.

five.one.two Starting Oracle Database Services

Oracle Database services must exist started for you to utilise Oracle Database and its products. You can start Oracle Database services from three dissimilar locations:

  • Command Panel

  • Command Prompt

  • Oracle Administration Assistant for Windows


    Note:

    Y'all can first Oracle Database when yous showtime OracleService SID . Meet "Starting and Shutting Downwardly a Database Using Services" for information on registry parameters that enable you to do this.

Command Panel

To start Oracle Database services from the Control Panel:

  1. Admission your Windows Services dialog.


    Run into Too:

    Your operating organisation documentation for instructions
  2. Detect the service to start in the list, select it, and click Outset.

    If you cannot discover OracleService SID in the list, then apply ORADIM to create it.

  3. Click Close to exit the Services dialog.

Command Prompt

To starting time 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 Banana for Windows:

  1. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Administration Assistant for Windows

  2. Right-click the SID .

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

  3. Click Start Service.

    This starts service OracleServiceORCL.

5.1.3 Stopping Oracle Database Services

On occasion (for instance, when re-installing Oracle Database), you must terminate Oracle Database services. You can stop Oracle Database services from three different locations:

  • Control Panel

  • Command Prompt

  • Oracle Administration Assistant for Windows


    Notation:

    Yous tin stop Oracle Database in normal, firsthand, or abort mode when you terminate OracleService SID . See "Starting and Shutting Down a Database Using Services" for information on registry parameters that enable yous to do this.

Control Panel

To stop Oracle Database services from the Control Panel:

  1. Access your Windows Services dialog.


    See Likewise:

    Your operating system documentation for instructions
  2. Select Oracle HOME_NAME TNSListener and click Finish.

    Oracle HOME_NAME TNSListener is stopped.

  3. Select OracleService SID and click Finish.

  4. Click OK.

    OracleService SID is stopped.

Command Prompt

To stop Oracle Database services from the control prompt, enter:

C:\> internet Terminate              service            

where service is a specific service name, such every bit OracleServiceORCL.

Oracle Assistants Banana for Windows

To end Oracle Database services from Oracle Assistants Assistant for Windows:

  1. Choose Showtime > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Administration Banana for Windows.

  2. Right-click the SID .

    where SID is a specific instance name, such equally orcl.

  3. Click Stop Service.

    This stops service OracleServiceORCL.

5.1.iv Automobile-starting Oracle Database Services

Oracle Database services can be fix to start automatically whenever the Windows calculator is restarted. You can plow auto-start on or off from two dissimilar locations:

  • Command Panel

  • Oracle Administration Assistant for Windows

Control Panel

To apply the Control Panel to configure when and how Oracle Database is started:

  1. Access your Windows Services dialog.


    See Too:

    Your operating system documentation for instructions
  2. Select service OracleServiceSID and click Startup.

  3. Choose Automated 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. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Assistants Banana for Windows.

  2. Right-click the SID .

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

  3. Cull Startup/Shutdown Options.

  4. Choose the Oracle Service tab.

  5. Choose Automatic in Oracle Service Startup Type.

  6. Click Apply.

  7. Click OK.

Description of ss_cnfg1.gif follows
Description of the illustration ss_cnfg1.gif


v.two Starting and Shutting Downwards a Database with SQL*Plus

These instructions presume that a database example has been created.


Note:

Directory path examples in this chapter follow Optimal Flexible Architecture (OFA) guidelines (for example, ORACLE_BASE \ ORACLE_HOME \rdbms\admin). If you specified not-OFA compliant directories during installation, and then your directory paths will differ. Run across Appendix B, "Optimal Flexible Architecture", in Oracle Database Installation Guide for Windows for more information.

To showtime or shut down Oracle Database:

  1. Go to your Oracle Database server.

  2. Commencement SQL*Plus at the command prompt:

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

    SQL> CONNECT / Every bit SYSDBA              
  4. To start a database, enter:

    SQL> STARTUP [PFILE=path\filename]              

    This control uses the initialization parameter file specified in path \ filename . To start a database using a file named init2.ora located in

    C:oracle\product\ten.i.0\admin\orcl\pfile              

    you would enter:

    SQL> STARTUP PFILE=C:oracle\product\10.1.0\admin\orcl\pfile\init2.ora              

    If no PFILE is specified, then the command looks for an SPFILE in ORACLE_HOME \database. If the command finds i, so the command uses it to starting time the database. If it does not find an SPFILE, then it uses the default initialization parameter file located in ORACLE_BASE \ADMIN\db_name\pfile.

  5. To stop a database, enter:

    SQL> SHUTDOWN [mode]              

    where mode is normal, firsthand, or abort.

    In a normal shutdown, Oracle Database waits for all currently-continued users to disconnect and disallows any new connections before shutting down. This is the default mode.

    In an immediate shutdown, Oracle Database terminates and rolls back active transactions, disconnects clients, and shuts downwards.

    In an arrest shutdown, Oracle Database terminates active transactions and disconnects users; it does not curl dorsum transactions. The database performs automatic recovery and rollback the next time it is started. Use this style merely in emergencies.


    See Also:

    Chapter 2, "Database Tools on Windows" for a listing of other tools that can outset Oracle Database and this guide for information on options you lot can specify when starting your database.

5.three Starting and Shutting Down a Database Using Services

Yous can start or shut 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 entering:

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 inbound:

C:\> oradim -SHUTDOWN -SID            SID            [-SHUTTYPE srvc | inst | srvc,inst] [-SHUTMODE  normal | firsthand | abort]          

You tin can enable starting and stopping Oracle Database through OracleService SID ii different means:

  • Oracle Administration Assistant for Windows

  • Setting Registry Parameters

Oracle Administration Assistant for Windows

To start or stop a database using Oracle Database services from Oracle Administration Assistant for Windows:

  1. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Administration Assistant for Windows.

  2. Right-click the SID .

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

  3. Choose Startup/Shutdown Options.

  4. Choose the Oracle Case tab.

  5. Select Start upward example when service is started, Shut down example when service is stopped, or both.

Description of ss_cnfg2.gif follows
Clarification of the illustration ss_cnfg2.gif

Setting Registry Parameters

To showtime or stop Oracle Database through Oracle Database Services, ready the following registry parameters to the indicated values:

  • ORA_ SID _AUTOSTART

    When set to true, the default value, this parameter causes Oracle Database to get-go 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, then oradim will effort to kickoff the database with an SPFILE or PFILE from ORACLE_HOME \database.

  • ORA_SHUTDOWN

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

  • ORA_ SID _SHUTDOWN

    When gear up to true, the default value, this parameter causes the instance of Oracle Database identified by the SID value to shut down when OracleService SID is stopped manually—using either the Control Console or Net stop command.


    Circumspection:

    If ORA_SHUTDOWN or ORA_SID_SHUTDOWN is set to false, then manually shutting downwardly OracleServiceSID will still close down Oracle Database. But it volition be an aberrant shutdown, and Oracle does not recommend it.

The post-obit 2 registry parameters are optional:

  • ORA_ SID _SHUTDOWNTYPE

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

  • ORA_ SID _SHUTDOWN_TIMEOUT

    This parameter sets maximum fourth dimension to look earlier the service for a particular 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 have merely one Oracle home directory, then these parameters belong in:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0          

If you have multiple Oracle dwelling directories, and so these parameters vest in:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\DomicileID          

where ID is incremented for each additional Oracle home directory on your computer.


Note:

If you use ORADIM to create or edit instances, then information technology automatically sets the relevant registry parameters to their appropriate values.

Starting or Stopping OracleServiceSID from the Control Console

  1. To start 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 stop the database, terminate OracleService SID .

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


    Run into Also:

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

5.four Starting Multiple Instances

  1. Start the service for each instance using ORADIM or the Services dialog of the Control Console.

  2. At the command prompt gear up the ORACLE_SID configuration parameter to the SID for the first case to run:

    C:\> Set ORACLE_SID=SID              

    where SID is the proper name of the Oracle Database instance.

  3. Start SQL*Plus:

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

    SQL> CONNECT / AS SYSDBA              
  5. Kickoff up the first instance:

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

    where ORACLE_BASE is c:\oracle\production\10.i.0 (unless you changed it during installation) and db_name is the name of the instance.

  6. Repeat Steps two-v for the other instances to run.

v.5 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_BASE \ ORACLE_HOME \DATABASE and are named PWD sid .ORA, where SID identifies the Oracle Database case. Password files tin can be used for local or remote connections to Oracle Database.

To create and populate a password file:

  1. Create a countersign file with the Password Utility:

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

    where

    • FILE specifies the password filename.

    • SID identifies the database example.

    • PASSWORD sets the countersign for account SYS.

    • ENTRIES sets maximum number of entries in password file. This corresponds to maximum number of distinct users allowed to connect to the database simultaneously with either the SYSDBA or the SYSOPER DBA privilege.

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

    The value exclusive specifies that simply one instance tin can employ the countersign file and that the password file contains names other than SYS. In search of the countersign file, Oracle Database looks in the registry for the value of parameter ORA_SID_PWFILE. If no value is specified, then 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 fix, then information technology uses the default:

                    ORACLE_BASE\ORACLE_HOME\DATABASE\PWDsid.ORA.              

    The default value is shared. It specifies that multiple instances (for example, a Real Application Clusters environment) tin use the password file. Nonetheless, 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 aforementioned files as information technology does when the value is sectional.

    none specifies that Oracle Database ignores the password file and that authentication of privileged users is handled by the Windows operating organization. This is the default setting.

  3. Start SQL*Plus:

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

    SQL> CONNECT / AS SYSDBA              
  5. Starting time 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 scott;              

    If the grant is successful, and then the following message displays:

    Argument Candy.              

    This adds scott to the password file and enables scott to connect to the database with SYSDBA privileges. Utilize SQL*Plus to add or delete usernames, user passwords, and user privileges in password files.


    Caution:

    Copying or manually moving password files may issue in ORADIM being unable to discover a countersign to start an instance.

5.5.one Viewing and Hiding the Countersign File

The password file is not automatically subconscious. Information technology tin be made invisible and visible again from two different locations:

  • Command Prompt

  • Windows Explorer


    Notation:

    The password file must exist visible earlier 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 as PWD sid .ora:

    A                  ORACLE_BASE\ORACLE_HOME\database\oradba.exe A                  ORACLE_BASE\ORACLE_HOME\database\OraDim.Log A                  ORACLE_BASE\ORACLE_HOME\database\PWDsid.ora A                  ORACLE_BASE\ORACLE_HOME\database\SPFILEsid.ora                
  2. To make the countersign file invisible, enter:

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

                      ORACLE_BASE\ORACLE_HOME\database> attrib                

    The password file is now hidden:

    A                  ORACLE_BASE\ORACLE_HOME\database\oradba.exe A                  ORACLE_BASE\ORACLE_HOME\database\OraDim.Log A   H                  ORACLE_BASE\ORACLE_HOME\database\PWDsid.ora A                  ORACLE_BASE\ORACLE_HOME\database\SPFILEsid.ora                
  4. To make the password file visible again, enter:

                      ORACLE_BASE\ORACLE_HOME\database> attrib -H PWDsid.ora                

Windows Explorer

To make the password file invisible or visible again:

  1. Navigate to directory ORACLE_BASE \ ORACLE_HOME \database.

  2. Right-click PWD sid .ora.

  3. Choose Properties.

    The PWD sid .ora Properties dialog opens.

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

  5. Click OK.

To view or hide an invisible countersign file:

  1. Navigate to directory ORACLE_BASE \ ORACLE_HOME \database.

  2. Choose Binder Options from the View primary menu.

  3. Choose the View tab.

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

  5. To hide a visible password file, choose Do not show hidden files and folders.

  6. Click OK.

5.half dozen Connecting Remotely to the Database as SYS

When connecting to the starter database from a remote computer as SYS, yous must use a unlike password from the one described in Oracle Database Installation Guide for Windows when logging on with SYSDBA privileges. This is because the password file enables database admission in this situation and it requires the countersign oracle for this purpose.

v.seven 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 information technology to the remote database. If the connection fails, then the failure is noted in the operating organisation inspect log.

5.8 Creating Control, Data, and Log Files on Remote Computers

Oracle Database can access database files on a remote estimator using Universal Naming Convention (UNC), simply it may degrade database performance and network reliability. UNC is a PC format for specifying locations of resources on a local area network. UNC uses the post-obit format:

\\server-proper noun\shared-resources-path-proper name          

For case, UNC specification for file system01.dbf in directory C:\oracle\product\10.one.0\oradata\orcl on shared server argon would be:

\\argon\oracle\product\10.1.0\oradata\orcl\system01.dbf          

Locations of archive log files cannot exist specified using UNC. E'er set initialization parameter LOG_ARCHIVE_DEST_ north to a mapped bulldoze. If you fix it to a UNC specification, then Oracle Database does non start and yous receive the post-obit errors:

ORA-00256: error occurred in translating archive text string '\meldell\rmdrive' ORA-09291: sksachk: invalid device specified for archive destination  OSD-04018: Unable to access the specified directory or device O/S-Fault: (OS ii) The system cannot find the file specified          

An ORA-00256 error also occurs if you lot enter \\\meldell\rmdrive or \\\meldell\\rmdrive. Control files required the additional backslashes for Oracle8 release 8.0.iv, only redo log files and datafiles did not.

v.9 Archiving Redo Log Files

If y'all installed Oracle Database through the Typical installation, then it is created in NOARCHIVELOG mode. If you created your database through the Custom option of Database Configuration Assistant, then you had the pick of either ARCHIVELOG or NOARCHIVELOG.

In NOARCHIVELOG style, 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 example and deejay failure.

This department describes how to change archive mode to ARCHIVELOG and enable automatic archiving.

5.ix.1 Irresolute Archive Style to ARCHIVELOG

  1. Start SQL*Plus at the command prompt:

    C:\> sqlplus /NOLOG                
  2. Connect to Oracle Database as SYSDBA:

    SQL> CONNECT / As SYSDBA                
  3. If the database is open, then shut it down:

    SQL> SHUTDOWN                
  4. Adjacent, mountain the database:

    SQL> STARTUP MOUNT                
  5. Enter the post-obit command:

    SQL> Annal LOG List                

    The post-obit output indicates the database is not in archive mode:

    Database log mode              No Archive Style Automated archival             Disabled Archive destination            %RDBMS%\ Oldest online log sequence     34 Current log sequence           37                
  6. Change archive mode to ARCHIVELOG:

    SQL> Alter DATABASE ARCHIVELOG;                
  7. Enter the following command:

    SQL> ARCHIVE LOG Listing                

    The post-obit output indicates the database is now in annal mode:

    Database log manner              Annal Mode Automated archival             Disabled Annal destination            %RDBMS%\ Oldest online log sequence     34 Current log sequence           37                
  8. Open the database:

    SQL> Alter DATABASE OPEN;                

5.ix.two Enabling Automatic Archiving

  1. Open file ORACLE_BASE \ADMIN\ db_name \pfile\init.ora.

  2. Find the following iii initialization parameters:

    # LOG_ARCHIVE_START = true # LOG_ARCHIVE_DEST_1 = %ORACLE_HOME%\database\archive # LOG_ARCHIVE_FORMAT = "%%ORACLE_SID%%T%TS%S.ARC"                
  3. Remove the # sign from in forepart of each.


    Notation:

    Double quotation marks effectually LOG_ARCHIVE_FORMAT
  4. Edit the LOG_ARCHIVE_DEST_ n value to identify an existing drive and directory in which to archive your filled redo logs.


    Annotation:

    Default size of Redo logs is approximately 100 MG.
  5. Edit the LOG_ARCHIVE_FORMAT value to betoken the appropriate archiving format:

    %% ORACLE_SID %%%T.ARC specifies the thread number. This number is padded to the left by zeroes. The default value is one with a range of up to three characters. Example: SID0001.ARC

    %% ORACLE_SID %%%S.ARC specifies the log sequence number. This number is padded to the left by zeroes. The default value is ane with a range of upwardly to five characters. Case: SID0001.ARC

    %% ORACLE_SID %%%t.ARC specifies the thread number. The number is not padded. The default value is ane with no range limit on characters. Instance: SID1.ARC

    %% ORACLE_SID %%%southward.ARC specifies the log sequence number. The number is not padded. The default value is one with no range limit on characters. Case: SID1.ARC

  6. Save your changes.

  7. Get out the file.

  8. Shut down the database:

    SQL> SHUTDOWN                
  9. Restart the database

    SQL> STARTUP                
  10. Enter the post-obit control:

    SQL> Annal LOG Listing                

    The following output indicates that automatic archiving of redo log files is enabled and an archiving destination is specified:

    Database log fashion              Archive Mode Automated archival             Enabled Archive destination            C:\Backup Oldest online log sequence     34 Current log sequence           37                

five.10 Backing Upward an Oracle Database on Windows

As noted in Table two-1, "Preferred Database Tools", Oracle recommends Oracle Enterprise Managing director Backup Wizard for fill-in and recovery. Oracle Database 101000 Release 1 (x.one) also bundles Legato Unmarried Server Version (LSSV) software to provide tape backups of your Oracle Database. Information technology is fully integrated with Recovery Manager (RMAN) to back upwards your database on a unmarried host. Legato NetWorker updates and documentation can be obtained directly from Legato and tin can exist institute at the following Spider web site:

http://www.legato.com/lssv/          

If you accept previously installed and used Legato Storage Manager (LSM) on your Oracle Database server, then you can uninstall it and install this new version of Legato NetWorker. Any backups made by LSM can even so be used past the new Legato NetWorker software.

Source: https://docs.oracle.com/cd/B14117_01/win.101/b10113/admin.htm

Posted by: ramseythipper82.blogspot.com

0 Response to "How To Start Oracle Database In Windows 7"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel