Creating and Managing a Database with DBCA

Skip Headers

Creating and Managing a Database with DBCA

During Oracle Database installation, if you choose to create a starter database (see Step 4), Oracle Universal Installer automatically runs Database Configuration Assistant (DBCA) after software installation is complete. DBCA then guides you through the steps to create the database. If you do not create a starter database and later want to create one, or if you want to create additional databases, then you use DBCA.
在安装oracle数据库的过程中,如果你选择了创建一个启动数据库(见第四步),在oracle软件安装完成之后,Oracle Universal Installer会自动的运行DBCA( Database Configuration Assistant)。DBCA会通过一系列步骤引导你创建一个数据库。如果你当时没选创建一个启动的数据库,只是想稍候再创建,或者是想创建另一个数据库,那么你就要用DBCA命令了。

Note:

With Oracle Database, you typically have a single database that hosts more than one application. You do not need multiple databases to run multiple applications. Instead, you separate the objects that support each different application into different schemas in the same database. However, there may be situations in which you want to create more than one Oracle database on the same host computer. When you do this with DBCA, the new databases typically use the same Oracle home directory as the first database, but store database data files separately from those of the first database.

注意:

 用oracle数据库一般来说只有一个数据库来支持多个应用。不需要让多个应用跑在多个数据库中,可以把不同应用的对象分开放到同一个数据库的不同模式中。然而,也有需要在一台主机上创建多个数据库的情况。当你用DBCA命令的时候,新建的数据库一般和旧的数据库用同一个oracle的主目录,但是存储数据库数据文件的目录是有区别的。

DBCA also enables you to modify a database configuration, delete a database, and more. This section describes the following DBCA tasks:
DBCA也可以让你修改一个数据库的配置、删除数据库以及更多操作。这节描述DBCA的功能如下:

  • Starting DBCA

  • Creating a Database Using DBCA

  • Changing the Configuration of a Database Using DBCA

  • Deleting a Database Using DBCA

  • Managing Templates with DBCA

Online Help is available by clicking Help. It provides information that guides you in selecting configuration options.
点击Help可以启动在线帮助。在线帮助能够在选择配置选项方面给你提供信息。

Starting DBCA

Follow the steps in this section to start DBCA.
通过以下步骤启动DBCA。

Note:

If you choose to create a starter database while installing the Oracle Database software, OUI automatically starts DBCA.
如果你在安装oracle数据库软件的时候,选择了建一个启动的数据库,OUI界面会自动启动。

To start DBCA:

  1. Log on to your computer as a member of the administrative group that is authorized to install Oracle Database software and to create and run the database.
    用能够安装oracle数据库软件的用户登录,创建并运行数据库。

  2. Do one of the following:
    做以下任意一项操作:

    • To start DBCA on a Microsoft Windows operating system, click Start, select Programs (or All Programs), then Oracle - HOME_NAME, then Configuration and Migration Tools, and then Database Configuration Assistant.
      在windows操作系统启动DBCA,点击开始,选择程序(或者是所有程序),然后Oracle-HOME_NAME然后Configuration and Migration Tools,然后Database Configuration Assistant。

    • To start DBCA on UNIX or Linux, or at the command-line prompt on the Windows operating system, enter the following command:
      在UNIX或Linux机器,或者在windows机器的命令行下启动DBCA,输入如下命令:

      dbca
      

      The dbca utility is typically located in the Oracle_home/bin directory.
      dbca命令在Oracle_home/bin目录下。

  3. Click Next to bypass with Welcome window.
    点击Next进入欢迎界面。

Creating a Database Using DBCA

DBCA enables you to create an Oracle database by following a step-by-step guided workflow.

To create a database using DBCA:
用DBCA创建一个数据库

  1. Start DBCA as described in "Starting DBCA".
    启动DBCA正如上文说的。

  2. In the Operations window, select Create a Database and click Next to start the guided workflow for creating a database. The workflow requests your input in the following windows:
    在操作窗口,选择Create a Database,然后点击Next启动创建一个数据库的导航。此导航需要你在如下窗口中输入参数:

  • Step 2 - Database Templates

  • Step 3 - Database Identification

  • Step 4 - Management Options

  • Step 5 - Database Credentials

  • Step 6 - Storage Options

  • Step 7 - Database File Locations

  • Step 8 - Recovery Configuration

  • Step 9 - Database Content

  • Step 10 - Initialization Parameters

  • Step 11 - Security Settings

  • Step 12 - Automatic Maintenance Tasks

  • Step 13 - Database Storage

  • Step 14 - Creation Options

The following sections provide details on each window. Most windows provide default settings.
下一段主要讲每个窗口的具体信息,大部分窗口都有默认值。

Step 2 - Database Templates

This window enables you to select the type of database that you want to create. You can use DBCA to create a database from templates supplied by Oracle or from templates that you create. The templates contain settings optimized for a particular type of workload.
这个窗口可以让你选择你想创建的数据库的类型,你可以通过oracle公司提供的或者你自己创建的模板来创建数据库。模板为一些特殊类型的工作提供了优化设置。

Oracle ships templates for the following two workload types:
oracle为以下两种工作量类型加载模板:

  • General purpose or transaction processing

  • Data warehouse

Click Show Details to see the configuration for each type of database. Select the template suited to the type of workload your database will support. If you are not sure which to choose, select the default General Purpose or Transaction Processing template.
点击Show Details可以查看每个类型的数据库的配置项。可以选择适合你的数据库工作量的类型的模板。如果你不知道选择哪个,就选择默认的模板——General Purpose or Transaction Processing。

For more complex environments, you can select the Custom Database option. This option does not use templates and results in a more extensive interview, which means that it will take longer to create your database.
在更复杂的环境中,你可以选择Custom Database选项。这个选项不会用到模板,所以有更多的人机交互,也就是说创建数据库的时间会更长。

For more information about using database templates, see "Managing Templates with DBCA".
关于运用数据库模板的信息参考 "Managing Templates with DBCA"

Step 3 - Database Identification

In the Global Database Name field, enter the database name in the form database_name.domain_name.
在Global Database Name栏里用以下格式输入数据库名,数据库.域名

In the SID field, enter the system identifier. The SID defaults to the database name and uniquely identifies the instance that runs the database.
在SID栏中,输入系统的唯一标识。SID默认为数据库名,并且是数据库运行的唯一标识。

Step 4 - Management Options

Use this window to set up your database so it can be managed with Oracle Enterprise Manager. Oracle Enterprise Manager provides Web-based management tools for individual databases, and central management tools for managing your entire Oracle environment.
用这个窗口来安装数据库,以后可以通过oracle企业管理器来管理,oracle企业管理器为每个数据库提供基于网页的管理工具,和以及管理整个数据库环境的管理工具。

Select Configure Enterprise Manager to use Enterprise Manager. Then, select one of the following options:
选择Configure Enterprise Manager来启动企业管理器,然后选择下面任一项:

  • If the Oracle Management Agent is installed on your host computer, then you can choose central management by selecting Register with Grid Control for centralized management and then selecting the Management Service.
    如果你在主机上安装了oracle管理代理,你可以选择Register with Grid Control for centralized management,然后选择管理服务。

  • To manage your database locally, select Configure Database Control for local management. You can then optionally configure email notification of database alerts or a daily backup of the database.
    想在本地管理你的数据库,选择Configure Database Control for local management。你可以有选择的配置通过email来通知数据库的警告或每日的数据库备份。

Step 5 - Database Credentials

In this window, specify the passwords for the administrative accounts such as SYS and SYSTEM.
这个窗口,为管理员账户(SYS,SYSTEM)指定密码。

Step 6 - Storage Options

In this window, specify the type of storage mechanism you would like your database to use. For more information, see "Advanced Installation".
在这个窗口这你的数据库指定存储类型,更多信息参见 "Advanced Installation"

Step 7 - Database File Locations

In this window, specify the Oracle software home and the directory path in which to create the database files. Select one of the following options:
在这个窗口指定oracle软件的根目录及创建数据库文件的目录路径,选择如下一项:

  • Use Database File Locations from Template—This option instructs DBCA to use the directory information as specified in the template. Later, you can make modifications to database file names and locations.
    Use Database File Locations from Template—这个选项告诉DBCA用模板里的目录信息。稍后你可以修改数据库文件名和存放位置。

  • Use Common Location for All Database Files—This option requires you to specify a new directory for the Oracle home. All the database files will be created in this location. Later, you can make modifications to database file names and locations.
    Use Common Location for All Database Files—这个选项需要你为oracle的根目录指定一个新的路径。所有的数据库文件都会在这个路径下创建。稍后你可以修改数据库文件名及存储路径。

  • Use Oracle-Managed Files—This option instructs Oracle Database to directly manage operating system files comprising an Oracle database. You specify the default location, called a database area, for all your files. Oracle Database thereafter automatically creates and deletes files in this location, as required. You can also create multiple copies of your redo and online log files by selecting Multiplex Redo Logs and Control Files. To learn more about redo logs and control files, see Chapter 9, "Performing Backup and Recovery".
    这个选项通知oracle数据库直接管理组成oracle数据库的操作系统文件。你可以为数据库文件指定默认的存储位置(又叫一个数据库的区域)。oracle数据库以后会在那个路径自动创建和删除文件。通过选择Multiplex Redo Logs and Control Files,你也可以创建多级的redo和在线日志的备份。更多的redo日志和控制文件参见 Chapter 9, "Performing Backup and Recovery"。

    Selecting this option enables you to delegate the complete management of database files to the database. You no longer need to specify the file names, location, or their sizes.
    选这个选项可以让你托管所有的数据库的数据文件,不再需要你指定文件名、存放路径、及它们的大小。

Step 8 - Recovery Configuration

When you create a new database, it is important to configure the database so you can recover your data in the event of a system failure. Redo logs contain a record of changes that were made to datafiles. Redo logs are stored in redo log groups, and you must have at least two redo log groups for your database. After the redo log files in a group have filled up, the log writer process (LGWR) switches the writing of redo records to a new redo log group. Oracle Database can automatically save the inactive group of redo log files to one or more offline destinations, known collectively as the archived redo log (also called the archive log). The process of turning redo log files into archived redo log files is called archiving.
创建一个新的数据库的时候,配置数据库非常重要,因为你可以在系统出错的时候恢复你的数据。redo日志里记录了数据文件的更改信息。redo日志存储在redo日志组中,你的数据库至少要有两个redo日志组。一个组中的redo日志写满了后,写日志的程序(LGWR)会切换到一个新的redo日志组继续写。oracle数据库可以自动的把非激活状态的redo日志文件存放在一个或者多个离线文件中,如大家所知的归档redo日志(也叫做归档日志)。把redo日志文件转换为归档redo日志文件叫做归档。

Archiving can be performed only if the database is running in ARCHIVELOG mode. This means a group of redo log files cannot be reused by the log writer (LGWR) process until the group is archived. If the database is running in NOARCHIVELOG mode, then when a group becomes inactive after the LGWR process switches to a new group, the inactive group is available for immediate reuse by the LGWR process.
归档必须在数据库在ARCHIVELOG模式下运行才行。就是说有一组redo日志文件只能在归档之后才能被数据库重用。如果数据库运行在NOARCHIVELOG模式下,LGWR进程通过切换redo日志组把一组redo日志变为了非激活状态,这时百激活状态的组才可以被LGWR进程重用。

The NOARCHIVELOG mode protects a database from instance failure but not from media failure. Only the most recent changes made to the database, which are stored in the online redo log groups, are available for instance recovery. To restore a database operating in NOARCHIVELOG mode, you can use only entire database backups taken while the database is closed. Therefore, if you decide to operate a database in NOARCHIVELOG mode, back up the entire database at regular, frequent intervals.
NOARCHIVELOG模式可以在实例故障的时候保护数据库,而不能出现介质故障。只有存在在线redo日志组中的更改可以进行数据库的恢复。从NOARCHIVELOG模式备份数据库只能在数据库停止的时候进行数据库的完整备份。因此,如果你决定在NOARCHIVELOG模式下操作数据库,要经常的进行数据库的全备份。

The archiving of redo log files has these advantages:
归档redo日志有如下好处:

  • A database backup, together with online and archived redo log files, guarantees that you can recover all committed transactions in the event of an operating system or disk failure.
    如果发生了操作系统或者磁盘故障数据库可以把所有提交的事物连同在线和归档的redo日志文件一起恢复。

  • You can recover the database using a backup that was taken while the database was open and being used, as long as you have a copy of the archived log files that were written while the database was being backed up.
    只要数据库写了归档日志文件,就可以在数据库运行的状态下进行数据库的恢复。

  • You can perform online tablespace backups, and use these backups to restore a tablespace following media failure.
    可以执行在线表空间备份,并且用这些备份来恢复由介质损坏的表空间。

  • You can keep a standby database current with its original database by continuously applying the original archived redo logs to the standby database.
    可以弄一个和源数据库一样的备份数据库,通过源数据库生成的归档日志文件,把源数据库里的数据同步到备份数据库中。

Before you can archive redo logs, you must determine the destination to which you will archive. Oracle recommends that the archive log be stored in a flash recovery area because it can simplify backup and recovery operations for your database. A flash recovery area is a location in which Oracle Database can store and manage files related to backup and recovery. It is distinct from the database area, which is a location for the current database files (datafiles, control files, and online redo logs).
在归档redo日志之前,要想好把归档日志文件放到哪里。oracle建议把归档日志放到闪回区,可以简化备份和恢复操作。闪回区是一个文件目录,oracle数据库可以在此管理和存储与备份恢复有关的文件。这与数据库区不同,数据库区是存放当前的数据库文件(包括:数据文件、控制文件、和在线redo日志)。

When creating your database, you can select the following options:
创建数据库的时候,还可以选择以下选项:

  • Specify Flash Recovery Area—Select this option to specify a backup and recovery area and its directory location and size. You can use variables to identify standard locations.
    Specify Flash Recovery Area—这个选项用来指定备份恢复区路径和大小的。也可以用变量来指定路径。

  • Enable Archiving—Select this option to enable the archiving of database redo logs, which can be used to recover a database. Selecting this option is the same as enabling Archive Log Mode in Oracle Enterprise Manager Enable Archiving—Database Control or running the database in ARCHIVELOG mode.
    这个选项是设置归档数据库的redo日志的,选了这个选项和在oracle企业管理器选择归档日志模式以及在数据库运行的时候设置为归档日志模式是一样的。

    Oracle recommends you select Enable Archiving. Selecting this option provides better protection for your database in the case of software or hardware failure. If you do not select this option now, you can enable ARCHIVELOG mode later. See "Configuring Your Database for Basic Backup and Recovery".
    oracle建议你选择Enable Archiving。选择了这个选项,在出现软件或硬件故障的情况下,给你的数据库的提供了更好的保障。如果现在没选这个选项,可以在稍后启动归档日志模式。参见 "Configuring Your Database for Basic Backup and Recovery"。

Step 9 - Database Content

When you create your database, you can load it with data using either of the following methods:
建数据库的时候,选择下面的一个选项都可以同时加载数据:

  • Sample Schemas—Select Sample Schemas to include the Sample Schemas (EXAMPLE) tablespace in your database. Oracle guides and educational materials contain examples based upon the Sample Schemas. Oracle recommends that you include them in your database.
    Sample Schemas—选择这个,可以把oracle的样例表空间导入到你的数据库中,oracle的引导及教学材料都在里面。oracle建议你选择这个选项。

  • Custom Scripts—In the Custom Scripts subpage, optionally specify one or more SQL scripts to run after your database is created. Scripts are useful for performing postinstallation tasks, such as loading custom schemas. Note that if you choose to run scripts after installation, your scripts must include a connection string that identifies the database. Click Help for more information.
    在这个子页中,可选的指定一个或多个SQL脚本在数据库创建完成后执行。脚本用来执行安装后的任务的,比如加载客户模式。注意如果你选择在安装之后运行脚本,你的脚本里必须有标识数据库的连接字符串。更多信息点击帮助。

Step 10 - Initialization Parameters

The links in this window provide access to additional windows that enable you to change the default initialization parameter settings. These parameters fall into the following categories:
这个窗口的连接提供了一个额外的窗口可以让你更改默认初始化参数。参数如下:

  • Memory

  • Sizing

  • Character Sets

  • Connection Mode

You can also click the All Initialization Parameters button at the bottom of the window to display a list of all the database initialization parameters and their current settings.
你也可以点击窗口下面的All Initialization Parameters按钮,可以显示出全部的初始化参数及当前的设置。

Memory

Use this window to set the initialization parameters that control how the database manages its memory. You can choose from one of the following methods for memory management:
这个窗口设置的初始化参数控制的是数据库如何管理它的内存。你可以从如下的方法中选择。

  • Typical—This method requires little configuration, and allocates memory as a percentage of total overall physical system memory. Select Typical and enter a percentage value. Click Show Memory Distribution to see how much memory DBCA assigns to the System Global Area (SGA) and the aggregate Program Global Area (PGA). With this setting, the system automatically tunes many of the memory components of the SGA, and allocates memory to individual PGAs as needed. The system can also dynamically decrease or increase the total amount of memory allocated to the SGA or aggregate PGA, depending on processing demands. The total memory used for the database instance never exceeds the amount you specify. This automatic memory tuning for the instance is known as automatic memory management. To learn more about PGA and SGA, see "About Instance Memory Structure".
    Typical—这个方法基本不需要什么配置操作,按系统总内存的一定百分比为数据库分配内存。选择Typical然后输入百分比。点击Show Memory Distribution 查看DBCA分配给SGA和总的PGA各多少内存,系统按需要自动调整SGA内部各组件的内存区大小和单独的PGA的内存大小。系统也会动态的减少或者增加分配给SGA或者PGA的内存总数,这个取决于具体处理的需要。数据库实例的总内存大小不会超出你指定的数值。这种动态内存调整就是所谓的automatic memory management,更多的PGA和SGA信息参见 "About Instance Memory Structure"

  • Custom—This method requires more configuration than the Typical option, but gives you more control over how the database uses system memory. This option is meant for more experienced database administrators. You can directly specify memory sizes for the SGA and aggregate PGA and their substructures, such as the shared pool and buffer cache.
    这比Typical选项需要配置的多,但是给你更多控制系统使用内存的权力。这个选项是为有经验的数据库管理员准备的。可以直接指定SGA和总的PGA及它们基础的大小,如shared pool 和 buffer cache。

    Select one of the following options for customized memory management:
    定制内存管理选择下面一项:

    • Automatic Shared Memory Management to allocate specific amounts of memory to the SGA and aggregate PGA. With this setting, automatic shared memory management is enabled for the SGA, and memory is allocated to the individual PGAs as needed.
      Automatic Shared Memory Management为SGA和总PGA分配指定数量的内存。通过这些设置SGA可以用自动分享内存管理,而内存也会按需分给不同的PGA。

    • Manual Shared Memory Management to enter specific values for each SGA component and the aggregate PGA. This disables automatic shared memory management and enables you to determine how the SGA memory is distributed among the SGA memory components.
      Manual Shared Memory Management为每个SGA组件和总PGA指定具体的数值。这种情况下不能进行自动的内存管理,而是用你输入的参数来管理SGA的所有组件所用的内存了。

See Also:

  • Chapter 5, "Managing the Oracle Instance" for more information about memory management options

Sizing

In this tab, you specify the smallest block size and the maximum number of operating system user processes that can simultaneously connect to the database.
在这个标签页,可以设置最小的内存块大小和操作系统同时访问数据库的最大用户进程数。

  • Block Size—Use this list to select the block size, or accept the default. Oracle Database data is stored in data blocks of the size specified. One data block corresponds to a specific number of bytes of physical space on disk. Block Size—Selecting a block size other than the default 8 kilobytes (KB) value requires advanced knowledge and should be done only when absolutely required.
    用这个列表来选择块的大小或使用默认值。oracle数据库的数据存放在指定大小的数据块中。一个数据块一般是磁盘上一定数量的物理字节数的和。不在必要的条件下不要选择非8k的数据块大小,除非是有经验的管理员。

    While using predefined templates, this list is not enabled because the database will be created with the default block size of 8 KB. While using the custom option, you can change the block size.
    当使用预定义的模板时,这个列表将不能使用,因为创建数据库的时候会用默认的8k来设置数据库块的大小。当用自定义选项的时候,可以改变数据库大小。

  • Processes—In this field, specify the maximum number of processes that can simultaneously connect to the database. Enter a number or accept the default value of 150. The default value for this parameter is appropriate for many environments. The value you select should allow for all background processes, user processes, and parallel execution processes.
    Processes—在这一栏里指定了,操作系统可同时访问数据库的最大用户进程数,输入一个数字或者使用默认的150。此参数的默认值适用于许多场景。你选择的值应该是后台进程,用户进程和并行执行进程的总和。

Character Sets

Use this tab to define the character sets used by your database. Character sets are the encoding schemes used to display characters on your computer screen. The character set determines what languages can be represented in the database.
用此标签页定义数据库的字符集,字符集是编码方案用来在电脑显示器上显示字符。字符集决定数据库用哪种语言。

Oracle recommends Unicode AL32UTF8 as the database character set. Unicode is the universal character set that supports most of the currently spoken languages of the world. The default character set suggested or used by Oracle Universal Installer and Database Configuration Assistant is based on the language configuration of the local operating system. If you choose to use a different character set, choose the character set most frequently used by the clients connecting to this database, for example WE8MSWIN1252. You might choose this character set if most clients connecting to the database run under the Microsoft Windows operating system.
oracle建议把Unicode AL32UTF8做为数据库的字符集,Unicode是通用字符集支持当前世界上大部分的语言。默认建议的字符集或者安装oracle的时候用的及数据库配置脚手用的字符集都是基于本地操作系统的语言配置。如果你选择用一个不对的字符集,选一个客户端连数据库经常用的,如WE8MSWIN1252。如果大部分连接数据库的客户端运行在windows操作系统下,你也可以选这个字符集。

  • Database Character Set—In this section, select from one of the following options:
    Database Character Set—在这部分选下面一项

    • Use the Default—Select this option to support only the language currently used by the operating system for all your database users and database applications.
      Use the Default—选这个选项只支持当前操作系统的语言。

    • Use Unicode (AL32UTF8)—Select this option to support multiple languages for your database users and database applications.
      Use Unicode (AL32UTF8)—这个选项支持多语言。

    • Choose from the list of character sets—Select this option if you want Oracle Database to use a character set other than the default character set used by the operating system.
      Choose from the list of character sets—如果不想用操作系统的默认字符集,选此选项。

  • National Character Set—In this list, select a character set or accept the default. The national character set is an alternative character set that enables you to store Unicode characters in a database that does not have a Unicode database character set. Choosing a national character set can make programming for multiple languages easier.
    National Character Set—在这个列表中,选一个字符集或者用默认的。如果没有Unicode字符集可以选择国际化字符集存储Unicode字符的。选择国际化字符集可以使你的程序更容易国际化。

  • Default Language—In this list, select a default database language or accept the default. The default language determines how the database supports locale-sensitive information such as day and month abbreviations, default sorting sequence for character data, and reading direction (left to right or right to left).
    Default Language—在这个列表中选择一个数据库默认的语言,或者使用默认设置。默认语言的作用在于,决定如日期,月份等的缩写、字符串的默认排序及阅读方向(从左到右还是从右到左)。

  • Default Territory—In this list, select the name of the territory whose conventions are to be followed for day and week numbering or accept the default. The default territory also establishes the default date format, the default decimal character and group separator, and the default International Standardization Organization (ISO) and local currency symbols. For example, in the United Kingdom, the default date format is DD-MON-YYYY, where DD is the day of the month (1-31), MON is the abbreviated name of the month, and YYYY is the 4-digit year.
    在这个列表中选择自己所在的区域,或者使用默认值。选择了存在区域,也就同时选择了默认的时间模式、默认的十进制字符和分隔符组、默认的国际标准组织(ISO)及本地金钱符号。例如在英国,默认的时间模式是DD-Default Territory—MON-YYYY,其中DD是一个有中的某一天(1-31),MON是月份的缩写,YYYY是4位数的年份。

Connection Mode

Use this window to select the database mode. You can run the database in either of the following modes:
用这个窗口选择数据库模式。可以在下面任一种模式运行数据库:

  • Dedicated Server Mode—This mode allows a dedicated server process for each user process. Select this option when the number of total clients is expected to be small, for example, 50 or fewer. You might also choose this option when database clients will typically make persistent, long-running requests to the database. By default, the database is configured for dedicated server processes.
    Dedicated Server Mode—这个模式为每个用户进程提供一个独占的服务进程。预期的客户端连接较少时用这个选项,比如50个连接以下。客户端如果是永久的长时间的连接也可以选择这个。默认情况下数据库会以独占服务进程配置安装。

  • Shared Server Mode—This mode allows several client connections to share a database-allocated pool of resources. Use this mode in configurations in which client load is expected to cause a strain on memory and other system resources. If you choose shared server mode, then you must indicate the number of server processes you want to create when a database instance is started. For more information about setting this parameter, click Help.
    用这个模式,几个客户端连接到数据库的资源共享分配池中。预期客户端的连接对内在和其它资源消耗很大,可以用这个模式。如果选择共享服务器模式,在数据库启动的时候需要显示的指定启动多少个服务进程。设置此参数的更多信息可以点击Help。

Step 11 - Security Settings

In this window, choose to use either the enhanced default security settings or the settings of a previous release, optionally disabling certain security features. The enhanced security settings include case-sensitive passwords.
在此窗口中,可以选择用增强的默认安全设置或者用前一个版本设置,可选的关掉合适的安全特性。增强的安全特性包含了密码区分大小写。

Step 12 - Automatic Maintenance Tasks

On this page you decide whether or not you want to enable the automatic maintenance tasks feature of Oracle Database 11g. Automated maintenance tasks are tasks that are started automatically at regular intervals to perform maintenance operations on the database. They are:
在这个页面你决定是否启用oracle 11G的自动维护任务特性。自动维护任务是每隔一定时间数据库自动启动的任务用来维护数据库操作。具体是:

  • Automatic Optimizer Statistics Collection—Collects optimizer statistics for all schema objects in the database for which there are no statistics or only stale statistics.
    Automatic Optimizer Statistics Collection—为那些没有统计或者只有些陈旧统计数据的模式对象收集最优化的统计数据。

  • Automatic Segment Advisor—Identifies segments that have space available for reclamation, and makes recommendations on how to defragment those segments.
    Automatic Segment Advisor—识别可用的磁盘碎片,并且建议如何进行碎片回收。

  • Automatic SQL Tuning Advisor—Examines the performance of high-load SQL statements, and makes recommendations on how to tune those statements.
    检查高负载的sql语句,并且建议如何调整那些语句。

See Oracle Database Administrator's Guide for more information.
更多信息参见 Oracle Database Administrator's Guide

Step 13 - Database Storage

In this window, a navigation tree displays the storage structure of your database (control files, datafiles, redo log groups, and so forth). If you are not satisfied with the storage structure or parameters, then you can make changes.
在此窗口中,会显示出来数据库的存储架构的导航树(控制文件,数据文件,redo日志组等)。如果你不满意这种存储架构或参数,可以进行修改。

Note that if you selected one of the preconfigured templates for a database, then you cannot add or remove control files, datafiles, or undo segments.
注意,如果你选择了预定义模板,那么就不能增加、删除控制文件,数据文件,和undo 段的文件。

Step 14 - Creation Options

In this window, select any of the following options for creating the database:
在此窗口,选择下面任一选项来创建数据库:

  • Create Database—Select this option to create your database at this time.
    Create Database—选此选项创建数据库。

  • Save as a Database Template—Select this option to save the database definition as a template to use at a later time.
    Save as a Database Template—选此选项,把数据库的定义保存为模板,可以以后再用。

  • Generate Database Creation Scripts—Select this option to generate a SQL database creation script that you can run at a later time.
    选此选项可以创建一个创建数据库的SQL脚本,可以以后再用。

After you make your choice, click Finish. A confirmation window appears after a short period of time. Review the information, and click OK to proceed.
选择了之后点击完成。之后会弹出一个确认窗口。回顾一下所有信息,点击OK来执行。

Changing the Configuration of a Database Using DBCA

You can use DBCA to change the configuration of an existing database. For example, you can:
你可以用DBCA来更改一个已有数据库的配置,例如,你可以:

  • Change default security settings
    更改默认安全设置

  • Change server mode from dedicated to shared, or the reverse
    更改服务器模式,由独占模式改为共享模式,也可以反过来改。

  • Add database options that were not previously configured (for example, Oracle Label Security or Oracle OLAP)
    为数据库添加之前没加的新的选项(比如,Oracle Label Security 或者Oracle OLAP)

To change the configuration of a database using DBCA:

  1. Start DBCA as described in "Starting DBCA".
    启动DBCA如上文写的 "Starting DBCA"

  2. In the Operations window, select Configure Database Options and click Next.
    在操作窗口中,选择Configure Database Options,然后点Next

  3. Follow the instructions in the DBCA guided workflow.
    跟着DBCA的导航操作。

Deleting a Database Using DBCA

You can also use DBCA to delete a database. When DBCA deletes a database, it shuts down the database instance and then deletes all database files. On the Windows platform, it also deletes associated Windows services.
你可以用DBCA来删除一个数据库,当用DBCA删除数据库的时候,它先停掉数据库实例然后删除所有的数据库文件,在windows平台上,它也删除相关的windows服务。

To delete a database using DBCA:

  1. Start DBCA as described in "Starting DBCA".

  2. In the Operations window, select Delete a Database and click Next.

  3. Select the database to delete and click Finish.

Managing Templates with DBCA

DBCA templates are XML files that contain information required to create a database. Templates are used in DBCA to create new databases and duplicate existing databases. The information in templates includes database options, initialization parameters, and storage attributes (for datafiles, tablespaces, control files, and online redo logs).
DBCA模板是一些XML文件,里面包含创建数据库需要的信息。DBCA用模板来创建新的数据库和复制已存在的数据库。模板里的信息包括数据库选项,初始化参数,和存储属性(数据文件,表空间,控制文件和在线redo日志)

Templates can be used just like scripts, but they are more powerful than scripts because you have the option of duplicating a database. Duplication saves time because you copy the files of an existing database, referred to as a seed database, to the correct locations.
模板可以像脚本一样用,但是比脚本的功能要大,因为有复制数据库的选项。复制数据库要节制时间,因为你需要把种子数据库的文件拷贝到正确的位置。

Templates are stored in the following directory:
模板存放在下面的目录中:

Oracle_home/assistants/dbca/templates

Advantages of Using Templates

Using templates has the following advantages:
用模板有如下好处:

  • Time saving. If you use a template, you do not have to define the database.
    省时。用模板就不需要定义数据库

  • Easy duplication. By creating a template containing your database settings, you can easily create a duplicate database without specifying parameters twice.
    容易复制。用你建数据库的模板,可以容易的复制一个相同数据库,而不用再一次设置参数。

  • Easy editing. You can quickly change database options from the template settings.
    容易编辑。可以快速的从模板设置上改变数据库选项。

  • Easy sharing. Templates can be copied from one computer to another.
    容易共享。模板可以从一个计算机拷贝到另一台机器上。

Types of Templates

Templates are divided into the following types:
模板有两种类型:

  • Seed templates
    种子模板

  • Nonseed templates
    非种子模板

The characteristics of each are shown in Table 2-1.

Table 2-1 DBCA Template Types

Type File Extension Includes Datafiles Database Structure

Seed

.dbc

Yes

This type of template contains both the structure and the physical datafiles of an existing database, referred to as the seed database. Your new database starts as a copy of the seed database, and requires only the following changes:
这类模板包括已有数据库的框架和物理数据文件,所说的种子数据库。新的数据库是种子数据库的复本。只需要改下面几项:

  • Name of the database
    数据库名字

  • Destination of the datafiles
    数据文件的存储位置

  • Number of control files
    控制文件个数

  • Number of redo log groups
    redo日志组的个数

  • Initialization parameters
    初始化参数

Other changes can be made after database creation using custom scripts that can be invoked by DBCA, command-line SQL statements, or Oracle Enterprise Manager Database Control.
其它的变化可以在数据库创建完成以后,通过DBCA,命令行的sql语句或者oracle企业管理器调用用户自定义的脚本来实现

The datafiles for the seed database are stored in compressed RMAN backup format in a file with a .dfb extension. The seed database control file is stored in a file with .ctl extension. (This file is needed only when storing datafiles in Automatic Storage Management (ASM) disk groups or as Oracle managed files.) The .dbc file contains the location of the seed database datafiles and contains the source database name used to mount the control file.
种子数据库的数据文件存放在一个后缀名为.dfb的文件中。此文件是用RMAN备份格式压缩的。种子数据库的控制文件存放在后缀名为.ctl的文件中。(这个文件只在下面两种情况下使用:1、数据文件存放在自动存储管理磁盘组(ASM)上。2、做为oracle自管理的文件)。.dbc文件包含种子数据库的数据文件的存放位置和用来加载控制文件的源数据库名字。

Nonseed

.dbt

No

This type of template is used to create a new database. It contains the characteristics of the database to be created. Nonseed templates are more flexible than their seed counterparts because all datafiles and online redo logs are created to your specification, and names, sizes, and other attributes can be changed as required.
这种类型的模板是用来创建一个新数据库的。包含创建数据库的特性。非种子模板比种子副本更有扩展性,因为所有的数据文件和在线redo日志都可以按你指定的路径、文件名和大小来创建,其它的属性也会按需要改变。


DBCA Templates Provided by Oracle

Oracle provides the templates shown in Table 2-2.
oracle提供许多模板见 Table 2-2。

Table 2-2 Oracle-Provided DBCA Templates and Their Corresponding Workloads

Template Workload

Data warehouse

Users perform numerous, complex queries that process large volumes of data. Response time, accuracy, and availability are key issues.
用户执行大量的复杂的处理大量数据的查询。响应时间、准确性和可用性是主要的关注点

These queries (SELECT statements) range from a fetch of a few records to queries that sort thousands of records from many different tables.

General Purpose or Transaction processing

Many concurrent users perform numerous transactions that require rapid access to data. Availability, speed, concurrency, and recoverability are key issues.
许多并发用户执行大量需要快速访问数据的事务。可用性、速度、并发和可恢复性是主要关注点。

Transactions consist of reading (SELECT statements), writing (INSERT and UPDATE statements), and deleting (DELETE statements) data in database tables.
事务由读(查询语句)、写(插入和更新语句)和删除(删除语句)数据库表中的数据组成。

Custom database

This template allows you maximum flexibility in defining a database because you can change any of the settings for the database being created.
这个模板在定义数据库方面有最大的扩展性,因为你可以更改创建数据库的任意一项设置。


Creating Templates Using DBCA

Follow the instructions in this section to create your own templates.
跟如下建议创建自己的模板。

To create templates:

  1. Start DBCA as described in "Starting DBCA".

  2. In the Operations window, select Manage Templates and click Next.

  3. In the Template Management window, select one of the following options, and click Next.
    在模板管理窗口,选择下面一项点击Next。

    • From an existing template

      Using an existing template, you can create a new template based on the predefined template settings. You can add or change any template settings such as initialization parameters, storage parameters, or whether or not to use custom scripts.
      可以基于预定义的模板设置创建一个新的模板。可以增加或者更改任何模板设置,如初始化参数,存储参数或是否用用户自定义脚本。

    • From an existing database (structure only)

      You can create a new template that contains structural information from an existing database, including database options, tablespaces, datafiles, and initialization parameters. User-defined schemas and their data will not be part of the created template. The source database can be either local or remote. Select this option when you want the new database to be structurally similar to the source database, but not contain the same data.
      可以从一个存在的数据库创建一个新的模板,此模板可以包含此数据库的结构信息,包括数据库选项,表空间,数据文件和初始化参数。用户定义的模式和它们的数据不是此模板的组成部分。源数据库即可以是本地的也可以是远程的。如果你想创建一个结构与源数据库一样,而里面的数据不一样的数据库,选择此选项。

    • From an existing database (structure as well as data)

      You can create a new template that has both the structural information and physical datafiles of an existing database. Databases created using such a template are identical to the source database. User-defined schemas and their data will be part of the created template. The source database must be local. Select this option when you want a template from which you can create an exact replica of the source database.

    When creating templates from existing databases, you can translate file paths into Optimal Flexible Architecture (OFA) or maintain existing file paths. OFA is a set of file naming and placement guidelines for Oracle software and databases. Using OFA is recommended if the target computer on which you plan to create a database using the template has a different directory structure than computer on which the template was defined. Standard file paths can be used if the target computer has a directory structure that is similar to the directory structure on the source computer.

  4. Follow the instructions in the DBCA guided workflow to create your template.

Deleting Templates

When you delete a template, it is no longer available to create a new database or a new template.

To delete a template:

  1. Start DBCA as described in "Starting DBCA".

  2. In the Operations window, select Manage Templates and click Next.

  3. In the Template Management window, select Delete a database template and click Next.

  4. Select the template to delete and click Finish.

你可能感兴趣的:(Creating and Managing a Database with DBCA)