2天DBA - 3 Getting Started with Oracle Enterprise Manager

Oracle Enterprise Manager, the Web-based interface for managing an Oracle database. Understanding this tool is essential to managing the Oracle database as described in the rest of this book.

essential 基本的、本质的、精华的

 

一、从以下几个方面介绍Oracle Enterprise Manager 的数据库管理控制

1、数据库管理功能 Database Managing Features

From the Oracle Enterprise Manager, you can perform administrative tasks such as creating schema objects (tablespaces, tables, and indexes), managing user security, backing up and recovering your database, and importing and exporting data. You can also view performance and status information about your database.

 

2、在线帮助 online help

3、导航功能 Navigational Features

Oracle Enterprise Manager 的导航功能包括:

Figure 3-1 Database Home Page Navigational Property Pages

Figure 3-2 Database Home Page Drill Down Links

Figure 3-3 Database Home Page Related Links

 

Drill n.钻孔机、操作 v.钻孔、训练

 

二、启停控制台 Starting and Stopping the Oracle Enterprise Manager Console

To access the Oracle Enterprise Manager Console from a client browser, the dbconsole process needs to be running on the server. The dbconsole process is automatically started after installation.

 

手工启动dbconsole:

  1. Navigate into your ORACLE_HOME/bin directory.

  2. Run the following statement:

    ./emctl start dbconsole
手工停止dbconsole:
./emctl stop dbconsole
查看dbconsole:
./emctl status dbconsole
在window中你可以将dbconsole启动为一个服务:

To start dbconsole as a service:

  1. From the main menu, click Start, Control Panel, Administrative Tools, Services. The Services page appears.

  2. Oracle services begin with Oracle. The dbconsole service is listed as OracleDBConsoleORACLE_SID, where ORACLE_SID is your SID. The status of this process is listed in the Status column, either Started or Stopped.

    Double click the service. The property page appears.

  3. In the properties page, ensure that the Startup Type is either Manual or Automatic and not Disabled. Click Start, if the process is not already started. Click OK.

You can also use the Services page to stop the process.

 三、访问控制台 Accessing the Oracle Enterprise Manager Database Control
 
 
    • Point your Web browser to the following URL:

      http://hostname:portnumber/em
      
      

      For example, if you installed the database on a host computer named comp42, and the installer indicated that your Enterprise Manager Console HTTP port number is 5500 (also recorded in the $ORACLE_HOME/install/portlist.ini file), enter the following URL:

      http://comp42:5500/em
      
      

      If the database is up, Enterprise Manager displays the Database Control Login page.

      If the database is down and needs to be re-started, Enterprise Manager displays the Startup/Shutdown and Perform Recovery page. If this is the case, click Startup/Shutdown and enter the host and target database login usernames and passwords. For the database user and password, use SYS and the password you specified during installation.

  1. Click OK to start the database. In the Confirmation screen, click YES to start the database in open mode.

  2. Log in to the database using a username that is authorized to access the Database Control. This initially could be SYS or SYSTEM. Use the password you specified for the account during the database installation.

    Enterprise Manager displays the Database Home page (Figure 3-4).

    The property pages across the top of the page enable you to access performance, administration, and maintenance pages for managing your database. The functionality provided by these pages is discussed in other chapters of this book.

    The various sections of the Database Home page and related links provide information about the database's environment and health. For example, the Alerts, Related Alerts, and Diagnostic Summary sections warn you of errors and performance problems that are impacting the operation of your database. You can click the provided links to see more detail about the problem area, and even to obtain recommendations for resolving the problem.

  3. This is discussed in Chapter 10, "Monitoring and Tuning the Database".

launch 发射、发起、投入

 

四、授权非管理员用户访问控制台 Granting Access to Database Control for Nonadministrative Users

 

they must be granted the SELECT_CATALOG_ROLE role. See "Example: Granting Privileges and Roles to a User Account".

五、创建管理员用户 Creating Database Control Administrative Users

 

数据库管理任务包括:

  • Creating other Database Control administrators

  • Configuring e-mail and other notification methods

    See "Setting Up Direct Alert Notification".

  • Setting alert thresholds for database metrics, such as tablespace space usage percentage exceeded or SQL response time exceeded

    See "Managing Alerts".

  • Selecting database policies to apply, so that Database Control can show alerts if a policy is violated. (An example policy is "A nonsystem user cannot use the SYSTEM or SYSAUX tablespace as its default tablespace.")

  • Defining blackouts, which are time periods in which database monitoring is suspended so that maintenance operations do not skew monitoring data or generate needless alerts.

    See "Defining Blackout Periods".

 创建一个管理数据库的用户:

 

To create a Database Control administrative user:

  1. On any Database Control page, at the top of the page, click Setup.

    The Enterprise Manager Configuration page appears, showing the Overview

  2. In the left navigation bar, click Administrators.

  3. 。。。

    Enter one or more e-mail addresses for this administrator only if you plan to set up e-mail notifications for the database.

    See "Setting Up Direct Alert Notification" for more information.

六、设置数据库控制参数 Setting Database Control Preferences

1、关于数据库控制参数:

Oracle Enterprise Manager Database Control (Database Control) enables you to set user preferences in the following areas:

通知:Notification,邮件通知Alert 。

中断管理:Blackout Administration,在日常维护数据库的时候,可以先中断,避免 receiving needless alerts and without skewing the monitoring data

 

To get a more accurate, long-term picture of database performance, you can use blackouts to exclude these special-case situations from data analysis.

  1. On any Database Control page, at the top of the page, click Setup.

    The Enterprise Manager Configuration page appears, showing the Overview of Setup page.

  2. In the left-hand pane, click Blackouts.

    The Blackouts page appears.

  3. Click Create to start the Create Blackout wizard.

    The Create Blackout: Properties page appears.

accurate:正确的,精确的

 

最信任:Preferred Credentials,数据库自动执行的日常任务。

To set preferred credentials for the database:

  1. From any Database Control page, at the top of the page, click Preferences.

    The Preferences page appears.

  2. Click Preferred Credentials in the left-hand pane.

    The Preferred Credentials page appears, showing a table of targets.

  3. In the table row for the Database Instance, click the icon under Set Credentials.

    The Preferred Credentials page appears.

  4. Enter database credentials for Normal Username/Password and SYSDBA Username/Password, and enter host credentials for Host Username/Password. For example, you might typically connect as the user SYSTEM, use the SYS account for SYSDBA access, and use oracle for the host user name.

注意:

The host user may require certain host privileges to run background jobs such as database backups. For example, on UNIX and Linux, the host user must belong to the OSDBA group (typically dba), and on Windows, the host user must be a member of the Administrators group and must be granted the Log on as batch job logon right. See your platform documentation for more information.

 

七、关于SQL、以SQL为基础的管理工具

启动SQL*PLUS,链接数据库:

The section describes how to start SQL*Plus and connect to the database from both the command line and the Windows start menu.

To start SQL*Plus and connect to the database from the command line:

  1. Open a command window.

  2. (Linux and UNIX systems only) 设置环境变量(ORACLE_HOME and ORACLE_SID) by running the script oraenv (for the Bourne, Korn, or Bash shell) or coraenv (for the C shell).

    这些脚本在 /usr/local/bin 目录下. They may prompt you for the desired value of the ORACLE_SID environment variable. 如果你在安全ORACLE的时候设置了SID,那么这个SID就是默认的SDI
    (Linux and UNIX systems only) 确认 Oracle_home/bin在环境变量PATH里

  3. Enter the following command:

    sqlplus {username | /} [as sysdba]
    Enter password: password
    

    SQL*Plus connects you to the default database instance (Microsoft Windows) or the database instance specified by the environment variables (Linux and UNIX).

    你可以使用SYS or SYSTEM 管理用户,如果你使用SYS用户,必须包含as sysdba
    如果你使用了as sysdba,那么oralce会使用操作系统验证。如下:
    When you enter SYS or a slash (/) as the user name and provide the as sysdba clause, you are authenticating using operating system authentication. Operating system authentication uses your Windows, UNIX, or Linux host user account to authenticate you to Oracle Database. You must have logged in to the host computer with a user account that is a member of a special host user group. On UNIX and Linux, this user group is typically dba. This type of authentication enables you to connect to an Oracle database that is not yet started, so that you can start it up. See Oracle Database Administrator's Guide for more information.

To start SQL*Plus and connect to the database from the Windows Start menu:

  1. Click Start, select Programs (or All Programs), then Oracle - HOME_NAME, then Application Development, and then SQL*Plus.

  2. When prompted, enter the user name and password for the account that you want to use to connect to the database.

    For the user name, you can use the SYS or SYSTEM administrative accounts, and you can use the password that you set up during installation.

    If you use SYS or / as the user name, follow them with a space and then the clause as sysdba, as shown in the following examples:

    Enter user-name: sys as sysdba
    Enter password: password
    
    or
    
    Enter user-name: / as sysdba
    

    When you enter SYS or a slash (/) as the user name and provide the as sysdba clause, you are authenticating using operating system authentication. Operating system authentication uses your Windows, UNIX, or Linux host user account to authenticate you to Oracle Database. You must have logged in to the host computer with a user account that is a member of a special host user group. On UNIX and Linux, this user group is typically dba for the sysdba privilege. This type of authentication enables you to connect to an Oracle database that is not yet started, so that you can start it up. See Oracle Database Administrator's Guide for more information.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值