■To create a database steps:
1. Create a parameter file and a password file.
2. Use the parameter file to build an instance in memory.
3. Issue the CREATE DATABASE command. This will generate, at a minimum,a controlfile; two online redo log files; two datafiles for the SYSTEM and SYSAUX tablespaces, and a data dictionary.
4. Run SQL scripts to generate the data dictionary views and the supplied PL/SQL packages.
5. Run SQL scripts to generate Enterprise Manager Database Control, along with any options (such as Java) that the database will require.
**************************
■States of database
・In SHUTDOWN mode, all files are closed and the instance does not exist.
・In NOMOUNT mode, the instance has been built in memory (the SGA has been created and the background processes started, according to whatever is specified in its parameter file) but no connection has been made to a database.It is indeed possible that the database does not yet exist.
・In MOUNT mode, the instance locates and reads the database control file.
・In OPEN mode, all database files are located and opened and the database is made available for use by end users.
The only files used in NOMOUNT mode are the parameter file and the alert log.
**************************
■Shutdown
shutdown [normal | transactional | immediate | abort]
・Normal This is the default. No new user connections will be permitted,
but all current connections are allowed to continue. Only once all users
have (voluntarily!) logged off will the database actually shut down
・Transactional No new user connections are permitted; existing sessions that are not in a transaction will be terminated; sessions currently in a transaction are allowed to complete the transaction and will then be terminated. Once all sessions are terminated, the database will shut down.
・Immediate No new sessions are permitted, and all currently connected
sessions are terminated. Any active transactions are rolled back, and the database will then shut down.
・Abort As far as Oracle is concerned, this is the equivalent of a power cut. The instance terminates immediately. Nothing is written to disk; no file handles are closed; there is no attempt to terminate transactions that may be in progress in any orderly fashion.
阅读(430) | 评论(0) | 转发(0) |