Specifying the Database Time Zone File (81)
Two time zone files are included in the Oracle home directory. The default time zone file is $ORACLE_HOME/oracore/zoneinfo/timezonelrg.dat. A smaller time zone file can be found in $ORACLE_HOME/oracore/zoneinfo/timezone.dat.If you are already using the smaller time zone file and you want to continue to use it in an Oracle Database 10g environment or if you want to use the smaller time zone file instead of the default time zone file, then complete the following tasks:1. Shut down the database.2.
Setting the Database Time Zone (80)
Set the database time zone when the database is created by using the SET TIME_ZONE clause of the CREATE DATABASE statement. If you do not set the database time zone, then it defaults to the time zone of the server's operating system.You can change the database time zone for a session by using the SET TIME_ZONE clause of the ALTER SESSION stateme设置数据库时区1. 可通过SET TIME_ZONE 语句设置数据库的时区 , 默认与操作系统相同2. 可为不同的会话指定不同的时区[@more@]
Overriding the Default Tablespace Type (79)
The SYSTEM and SYSAUX tablespaces are always created with the default tablespacetype. However, you can explicitly override the default tablespace type for the UNDOand DEFAULT TEMPORARY tablespace during the CREATE DATABASE operation.For example, you can create a bigfile UNDO tablespace in a database with the defaulttablespace type of smallfile as follows:CREATE DATABASE rbdb1... BIGFILE UNDO TABLESPACE undotbs DATAFILE '/u01/oracle/oradata/mynewdb/undotbs01.dbf' SIZE 200M REUSE
Specifying the Default Tablespace Type (78)
The SET DEFAULT...TABLESPACE clause of the CREATE DATABASE statement todetermines the default type of tablespace for this database in subsequent CREATETABLESPACE statements. Specify either SET DEFAULT BIGFILE TABLESPACE orSET DEFAULT SMALLFILE TABLESPACE. If you omit this clause, the default is asmallfile tablespace, which is the traditional type of Oracle Database tablespace. Asmallfile tablespace can contain up to 1022 files with up to 4M blocks each.The use of bigfile tablespaces further enha
Supporting Bigfile Tablespaces During Database Creation (77)
Oracle Database simplifies management of tablespaces and enables support forultra-large databases by letting you create bigfile tablespaces. Bigfile tablespaces cancontain only one file, but that file can have up to 4G blocks. The maximum number ofdatafiles in an Oracle Database is limited (usually to 64K files). Therefore, bigfiletablespaces can significantly enhance the storage capacity of an Oracle Database.数据库创建过程中支持大文件表空间操作1. 大文件表空间只能有1个数据文件 , 该文件最大可
Specifying Oracle-Managed Files at Database Creation (76)
You can minimize the number of clauses and parameters that you specify in your CREATE DATABASE statement by using the Oracle-managed files feature. You do this either by specifying a directory in which your files are created and managed by Oracle Database, or by using Automatic Storage Management. When you use Automatic Storage Management, you specify a disk group in which the database creates and manages your files, including file redundancy and striping. By including any of the initialization
Creating a Default Temporary Tablespace (75)
The DEFAULT TEMPORARY TABLESPACE clause of the CREATE DATABASE statement creates a default temporary tablespace for the database. Oracle Database assigns this tablespace as the temporary tablespace for users who are not explicitly assigned a temporary tablespace.You can explicitly assign a temporary tablespace or tablespace group to a user in the CREATE USER statement. However, if you do not do so, and if no default temporary tablespace has been specified for the database, then by default these
Creating a Default Permanent Tablespace (74)
The DEFAULT TABLESPACE clause of the CREATE DATABASE statement specifies a default permanent tablespace for the database. Oracle Database assigns to this tablespace any non-SYSTEM users for whom you do not explicitly specify a different permanent tablespace. If you do not specify this clause, then the SYSTEM tablespace is the default permanent tablespace for non-SYSTEM users. Oracle strongly recommends that you create a default permanent tablespace.创建默认永久表空间1. 指定非系统用户的默认永
Using Automatic Undo Management: Creating an Undo Tablespace (73)
Automatic undo management uses an undo tablespace.To enable automatic undo management, set the UNDO_MANAGEMENT initialization parameter to AUTO in your initialization parameter file. In this mode, undo data is stored in an undo tablespace and is managed by Oracle Database. If you want to define and name the undo tablespace yourself, you must also include the UNDO TABLESPACE clause in the CREATE DATABASE statement at database creation time. If you omit this clause, and automatic undo management i
Creating the SYSAUX Tablespace (72)
The SYSAUX tablespace is always created at database creation. The SYSAUX tablespaceserves as an auxiliary tablespace to the SYSTEM tablespace. Because it is the defaulttablespace for many Oracle Database features and products that previously requiredtheir own tablespaces, it reduces the number of tablespaces required by the databaseand that you must maintain. Other functionality or features that previously used theSYSTEM tablespace can now use the SYSAUX tablespace, thus reducing the load on the
Creating a Locally Managed SYSTEM Tablespace (71)
Specify the EXTENT MANAGEMENT LOCAL clause in the CREATE DATABASE statemento create a locally managed SYSTEM tablespace. The COMPATIBLE initializationparameter must be set to 9.2 or higher for this statement to be successful. If you do nospecify the EXTENT MANAGEMENT LOCAL clause, by default the database creates adictionary-managed SYSTEM tablespace. Dictionary-managed tablespaces aredeprecated.A locally managed SYSTEM tablespace has AUTOALLOCATE enabled by default, whicmeans that the system det
Protecting Your Database: Specifying Passwords for Users SYS and SYSTEM (70)
The clauses of the CREATE DATABASE statement used for specifying the passwords forusers SYS and SYSTEM are:■ USER SYS IDENTIFIED BY password■ USER SYSTEM IDENTIFIED BY passwordIf you omit these clauses, these users are assigned the default passwordschange_on_install and manager, respectively. A record is written to the alert logindicating that the default passwords were used. To protect your database, you shouldchange these passwords using the ALTER USER statement immediately after databasecre
Understanding the CREATE DATABASE Statement (69)
When you execute a CREATE DATABASE statement, Oracle Database performs (at least)a number of operations. The actual operations performed depend on the clauses thatyou specify in the CREATE DATABASE statement and the initialization parameters thatyou have set. Oracle Database performs at least these operations:■ Creates the datafiles for the database■ Creates the control files for the database■ Creates the redo log files for the database and establishes the ARCHIVELOG mode.■ Creates the SYSTE
Step 10: Run Scripts to Install Additional Options (Optional) (68)
You may want to run other scripts. The scripts that you run are determined by thefeatures and options you choose to use or install. Many of the scripts available to youare described in the Oracle Database Reference.If you plan to install other Oracle products to work with this database, see theinstallation instructions for those products. Some products require you to createadditional data dictionary tables. Usually, command files are provided to create andload these tables into the database data
Step 9: Run Scripts to Build Data Dictionary Views (67)
Run the scripts necessary to build views, synonyms, and PL/SQL packages:CONNECT SYS/password AS SYSDBA@/u01/oracle/rdbms/admin/catalog.sql@/u01/oracle/rdbms/admin/catproc.sqlEXITThe following table contains descriptions of the scripts:CATALOG.SQL : Creates the views of the data dictionary tables, the dynamic performance views, and public synonyms for many of the views. Grants PUBLIC access to the synonyms.CATPROC.SQL : Runs all scripts required for or used with PL/SQL.第
Step 8: Create Additional Tablespaces (66)
To make the database functional, you need to create additional files and tablespacesfor users. The following sample script creates some additional tablespaces:CONNECT SYS/password AS SYSDBA-- create a user tablespace to be assigned as the default tablespace for usersCREATE TABLESPACE users LOGGINGDATAFILE '/u01/oracle/oradata/mynewdb/users01.dbf'SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITEDEXTENT MANAGEMENT LOCAL;-- create a tablespace for indexes, separate from user tablespaceCREATE
Step 11: Back Up the Database. (69)
Take a full backup of the database to ensure that you have a complete set of files fromwhich to recover if a media failure occurs. For information on backing up a database,see Oracle Database Backup and Recovery Basics.第十一步 : 数据库全库备份[@more@]
Step 7: Issue the CREATE DATABASE Statement (65)
To create the new database, use the CREATE DATABASE statement. The followingstatement creates database mynewdb:CREATE DATABASE mynewdbUSER SYS IDENTIFIED BY pz6r58USER SYSTEM IDENTIFIED BY y1tz5pLOGFILE GROUP 1 ('/u01/oracle/oradata/mynewdb/redo01.log') SIZE 100M,GROUP 2 ('/u01/oracle/oradata/mynewdb/redo02.log') SIZE 100M,GROUP 3 ('/u01/oracle/oradata/mynewdb/redo03.log') SIZE 100MMAXLOGFILES 5MAXLOGMEMBERS 5MAXLOGHISTORY 1MAXDATAFILES 100MAXINSTANCES 1CHARACTER SET US7ASCIINATIONAL CHARACTER S
Step 6: Start the Instance (64)
Start an instance without mounting a database. Typically, you do this only duringdatabase creation or while performing maintenance on the database. Use the STARTUPcommand with the NOMOUNT clause. In this example, because the server parameter fileis stored in the default location, you are not required to specify the PFILE clause:STARTUP NOMOUNTAt this point, the SGA is created and background processes are started in preparationfor the creation of a new database. The database itself does not yet e
Step 4: Connect to the Instance (62)
Start SQL*Plus and connect to your Oracle Database instance AS SYSDBA.$ SQLPLUS /nologCONNECT SYS/password AS SYSDBA第四步 : 以sysdba连接实例[@more@]