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@]
Step 5: Create a Server Parameter File (Recommended) (63)
Oracle recommends that you create a server parameter file. The server parameter fileenables you to change initialization parameters with database commands and persistthe changes across a shutdown and startup. You create the server parameter file fromyour edited text initialization file. The following script creates a server parameter file from the text initializationparameter file and writes it to the default location. The script can be executed before orafter instance startup, but after you con
Step 2: Establish the Database Administrator Authentication Method (60)
You must be authenticated and granted appropriate system privileges in order tocreate a database. You can use the password file or operating system authenticationmethod.第二步 : 建立数据库管理员的认证方式[@more@]
Step 1: Decide on Your Instance Identifier (SID) (59)
An instance is made up of the system global area (SGA) and the background processesof an Oracle Database. Decide on a unique Oracle system identifier (SID) for yourinstance and set the ORACLE_SID environment variable accordingly. This identifier isused to distinguish this instance from other Oracle Database instances that you maycreate later and run concurrently on your system.The following example for UNIX operating systems sets the SID for the instance thatyou will connect to in Step 4: Connec
Step 3: Create the Initialization Parameter File (61)
When an Oracle instance starts, it reads an initialization parameter file. This file canbe a read-only text file, which must be modified with a text editor, or a read/write binaryfile, which can be modified dynamically by the database (for tuning) or with SQLcommands that you submit. The binary file, which is preferred, is called a serverparameter file. In this step, you create a text initialization parameter file. In a laterstep, you can optionally create a server parameter file from the text f
Creating the Database (58)
This section presents the steps involved when you create a database manually. Thesesteps should be followed in the order presented. The prerequisites described in thepreceding section must already have been completed. That is, you have established theenvironment for creating your Oracle Database, including most operating systemdependent environmental variables, as part of the Oracle software installation process.Step 1: Decide on Your Instance Identifier (SID)Step 2: Establish the Database Admin
Data Utilities : Export and Import Utilities (57)
Oracle export and import utilities enable you to move existing data in Oracle formatbetween one Oracle Database and another. For example, export files can archivedatabase data or move data among different databases that run on the same ordifferent operating systems.数据工具 : Export/Import可在不同的操作系统之间以Oracle的格式 , 将已有的数据进行导入导出[@more@]