|Oracle7 Server Administrator's Guide||
Oracle Server Manager User's Guide.
Creating a database includes the following operations:
For information about database backup and recovery, see Chapters 23 and 24.
See Also: "National Language Support" in the Oracle7 Server Reference.
See Also: Oracle7 Server Migration manual for information about migrating an existing database.
For information about migrating to Trusted Oracle7, see the Trusted Oracle7 Server Administrator's Guide.
For more information about migrating an existing database, see your operating system-specific Oracle documentation.
To Create a New Database and Make It Available for System Use
See Also: These steps provide general information about database creation on all operating systems. See your operating system-specific Oracle documentation for information about creating databases on your platform.
Step 1 Back up any existing databases.
Oracle Corporation strongly recommends that you make complete backups of all existing databases before creating a new database, in case database creation accidentally affects some existing files. Backup should include parameter files, datafiles, redo log files, and control files.
Step 2 Create parameter files.
The instance (System Global Area and background processes) for any Oracle7 database is started using a parameter file.
Each database on your system should have at least one customized parameter file that corresponds only to that database. Do not use the same file for several databases.
To create a parameter file for the database you are about to make, use your operating system to make a copy of the parameter file that Oracle7 provided on the distribution media. Give this copy a new filename. You can then edit and customize this new file for the new database.
See Also: For more information about copying the parameter file, see your operating system-specific Oracle documentation.
Note: In distributed processing environments, Server Manager is often executed from a client machine of the network. If a client machine is being used to execute Server Manager and create a new database, you need to copy the new parameter file (currently located on the computer executing Oracle7) to your client workstation. This procedure is operating system-dependent. For more information about copying files among the computers of your network, see your operating system-specific Oracle documentation.
Step 3 Edit new parameter files.
To create a new database, inspect and edit the following parameters of the new parameter file:
|DB_NAME||page 2 - 9|
|DB_DOMAIN||page 2 - 9|
|CONTROL_FILES||page 2 - 10|
|DB_BLOCK_SIZE||page 2 - 11|
|DB_BLOCK_BUFFERS||page 2 - 11|
|PROCESSES||page 2 - 12|
|ROLLBACK_SEGMENTS||page 2 - 12|
|LICENSE_MAX_SESSIONS||page 2 - 12|
|LICENSE_SESSION_WARNING||page 2 - 12|
|LICENSE_MAX_USERS||page 2 - 13|
If you have other databases, check the Oracle7 instance identifier. The Oracle7 instance identifier should match the name of the database (the value of DB_NAME) to avoid confusion with other Oracle7 instances that are running concurrently on your system.
See your operating system-specific Oracle documentation for more information.
Step 5 Start Server Manager and connect to Oracle7 as an administrator.
Once Server Manager is running, connect to the database as an administrator.
See Also: Starting Server Manager is operating system specific; see your operating system-specific Oracle documentation for details.
Step 6 Start an instance.
To start an instance (System Global Area and background processes) to be used with the new database, use the Startup Database dialog box of Server Manager. In the Startup Database dialog box, make sure that you have selected the Startup Nomount radio button.
After selecting the Startup Nomount, the instance starts. At this point, there is no database. Only an SGA and background processes are started in preparation for the creation of a new database.
Step 7 Create the database.
To create the new database, use the SQL command CREATE DATABASE, optionally setting parameters within the statement to name the database, establish maximum numbers of files, name the files and set their sizes, and so on.
When you execute a CREATE DATABASE statement, Oracle performs the following operations:
Step 8 Back up the database.
You should make a full backup of the database to ensure that you have a complete set of files from which to recover if a media failure occurs. See Chapter 23.
See Also: "Backing Up a Database," Chapter 23.
"Using Parameter Files" for more information about parameter files.
Oracle7 Server SQL Reference for information about the CREATE DATABASE command, character sets, and database creation.
CREATE DATABASE test LOGFILE GROUP 1 ('test_log1a', 'test_log1b') SIZE 500K, GROUP 2 ('test_log2a', 'test_log2b') SIZE 500K, DATAFILE 'test_system' SIZE 10M;
The values of the MAXLOGFILES, MAXLOGMEMBERS, MAXDATAFILES, MAXLOGHISTORY, and MAXINSTANCES options in this example assume the default values, which are operating system-dependent. The database is mounted in the default modes NOARCHIVELOG and EXCLUSIVE and then opened.
The items and information in the example statement above result in creating a database with the following characteristics:
See Also: For more information about setting limits during database creation, see the Oracle7 Server SQL Reference.
See your operating system-specific Oracle documentation for information about operating system limits.
After correcting the error that caused the failure of the database creation, return to Step 6 of "Creating a Oracle7 Database."
To view the names of the database's datafiles and redo log files, query the data dictionary views V$DBFILE and V$LOGFILE.
See Also: For more information about these views, see the Oracle7 Server Reference.
DB_NAME = TEST
DB_DOMAIN = US.ACME.COM
DB_NAME must be set to a text string of no more than eight characters. During database creation, the name provided for DB_NAME is recorded in the datafiles, redo log files, and control file of the database. If during database instance startup the value of the DB_NAME parameter (of the parameter file) and the database name in the control file are not the same, the database does not start.
DB_DOMAIN is a text string that specifies the network domain where the database is created; this is typically the name of the organization that owns the database. If the database you are about to create will ever be part of a distributed database system, pay special attention to this initialization parameter before database creation.
See Also: For more information about distributed databases, see Oracle7 Server Distributed Systems, Volume I.
Warning: Use extreme caution when setting this option. If you inadvertently specify a file that you did not intend and execute the CREATE DATABASE statement, the previous contents of that file will be overwritten.
If no filenames are listed for the CONTROL_FILES parameter, Oracle7 uses a default filename.
Oracle Corporation strongly recommends you use at least two control files stored on separate physical disk drives for each database. Therefore, when specifying the CONTROL_FILES parameter of the new parameter file, follow these guidelines:
When you execute the CREATE DATABASE statement (in Step 7), the control files listed in the CONTROL_FILES parameter of the parameter file will be created.
See Also: The default filename for the CONTROL_FILES parameter is operating system-dependent. See your operating system-specific Oracle documentation for details.
For example, if your operating system's block size is 2K (2048 bytes), the following setting for the DB_BLOCK_SIZE initialization parameter would be valid:
DB_BLOCK_SIZE also determines the size of the database buffers in the buffer cache of the System Global Area (SGA).
See Also: For details about your default block size, see your operating system-specific Oracle documentation.
Estimate the number of data blocks that your application accesses most frequently, including tables, indexes, and rollback segments. This estimate is a rough approximation of the minimum number of buffers the cache should have. Typically, 1000 or 2000 buffers is sufficient.
See Also: For more information about tuning the buffer cache, see the Oracle7 Server Tuning manual.
Attention: After installation, you must create at least one rollback segment in the SYSTEM tablespace in addition to the SYSTEM rollback segment before you can create any schema objects.
See Also: For more information about how many rollback segments you need, see Oracle7 Server Tuning.
See Also: For more information about managing licensing, see page 19 - 2.
LICENSE_MAX_SESSIONS = 80
In addition to setting a maximum number of sessions, you can set a warning limit on the number of concurrent sessions. Once this limit is reached, additional users can continue to connect (up to the maximum limit), but Oracle7 sends a warning for each connecting user. To set the warning limit for an instance, set the parameter LICENSE_SESSIONS_WARNING. Set the warning limit to a value lower than LICENSE_MAX_SESSIONS.
For instances running with the Parallel Server, each instance can have its own concurrent usage limit and warning limit. However, the sum of the instances' limits must not exceed the site's session license.
See Also: For more information about setting these limits when using the Parallel Server, see Oracle7 Parallel Server Concepts & Administration.
Note: This mechanism assumes that each person accessing the database has a unique user name and that no people share a user name. Therefore, so that named user licensing can help you ensure compliance with your Oracle7 license agreement, do not allow multiple users to log in using the same user name.
To limit the number of users created in a database, set the LICENSE_MAX_USERS parameter in the database's parameter file, as shown in the following example:
LICENSE_MAX_USERS = 200
For instances running with the Parallel Server, all instances connected to the same database should have the same named user limit.
See Also: For more information about setting this limit when using the Parallel Server see the Oracle7 Parallel Server Concepts & Administration manual.
If you plan to install other Oracle products to work with this database, see the installation instructions for those products; some products require you to create additional data dictionary tables. See your operating system-specific Oracle documentation for the additional products. Usually, command files are provided to create and load these tables into the database's data dictionary.
The Oracle7 Server distribution media can include various SQL files that let you experiment with the system, learn SQL, or create additional tables, views, or synonyms.
A newly created database has only two users, SYS and SYSTEM. The passwords for these two usernames should be changed soon after the database is created.
See Also: For more information about the users SYS and SYSTEM see "Database Administrator Usernames" .
For information about changing a user's password see "Altering Users" .
To create rollback segments, use the CREATE ROLLBACK SEGMENT command.
See Also: For information about the CREATE ROLLBACK SEGMENT command, see the Oracle7 Server SQL Reference.
See Also: For information about choosing sizes for your rollback segments, see the Oracle7 Server Tuning manual.
You can specify the number of LRU latches on your system with the initialization parameter DB_BLOCK_LRU_LATCHES. This parameter sets the maximum value for the desired number of LRU latches. Each LRU latch will control a set of buffers and Oracle balances allocation of replacement buffers among the sets.
See Also: For more information on LRU latches, see the Oracle7 Server Tuning manual.
There are several ways to distribute I/O when you install Oracle7:
Copyright © 1996 Oracle Corporation.
All Rights Reserved.