Oracle Manually CREATE database steps detailed _oracle

Source: Internet
Author: User
Tags create database sqlplus

Here's a list of Oracle manual database steps as follows:

1. Write initialization parameter file
2. Set operating system environment variables
3. Create an instance
4. Connect to the database as an administrator
5. Startup instance
6.create Database Creating databases
7. Run the data dictionary script
8.Oracle Network configuration (client connected to server)

Initializing parameter files

From%oracle_home%\admin\sample\pfile copy initsmpl.ora file, and paste it into $oracle_home%\database directory, renamed Init<sid> The hypothesis is changed to Initzhouyt.ora. (init is a text file)

Modify the contents of the Initzhouyt.ora

New parameters
* Instance_name=zhouyt
* db_domain=hdu.edu.cn
modifying parameters
* Db_name=zhouyt
* DB_BLOCK_SIZE=8192 (8kM)
* Remote_login_passwordfile=exclusive

Operating system Environment variables

Setting the operating system environment variable ORACLE_SID the name of the database instance

Set Oracle_sid=zhouyt

The command is valid only for current under Window DOS window, and when the window is closed and you want to remain valid, you need to modify it in the system environment variable

Create an instance

Utility Oradim Use

In the DOS window, enter the command oradim-new-sid zhouyt-intpwd sys123 (SYS's password, SYS is the administrator)-startmode Auto


SID is Oracle's "identity card number" in the operating system

Administrator Identity Connection Database

Sqlplus Utility Login Database

In DOS command input sqlplus/nolog only login status

To connect to a database as a database administrator

On the basis of the above input command connect sys/sys123 as Sysdba
Because you can install a database by logging on as a database administrator

Start instance

Converts the text initialization parameter file pfile into a binary initialization parameter file SPFile

Because database startup needs to find a configuration file, find the binary file by default, or manually start a text file, then this step doesn't need to be
Enter command create SPFile from Pfile; (There will be an error, because the text file compares raves to Oracle 10g), this time we need to modify the configuration file Initzhouyt.ora

The Spfilezhouyt.ora file is generated at this time under the%oracle_home%\database file

Start an instance in Nomount form

Command startup Nomount, there will be errors, when we follow the prompts to modify the text file, if we still follow the startup Nomount to start, we want to generate the corresponding binaries to overwrite the old binary file

and comment%seed_control%

Create databae Creating a database

Creating Database Scripts

Three files
Control file
Data files
Redo log Files

Create DATABASE Zhouyt
datafile
   ' C:\oracle\product\10.2.0\db_2\zhouyt\system_01.dbf ' size 100m
   Autoextend on next 10m maxsize unlimited
sysaux datafile
   ' C:\oracle\product\10.2.0\db_2\zhouyt\systemaux_01. DBF ' size 60m
   autoextend on next 10m maxsize unlimited
logfile
Group 1 (' C:\oracle\product\10.2.0\db_2\ Zhouyt\log_1_01.rdo ') size 10m,
Group 2 (' C:\oracle\product\10.2.0\db_2\zhouyt\log_2_01.rdo ') size 10m
Character Set ZHS16GBK;

Need to ensure that the directory file "Db_2\zhouyt" exists

Generate two data files and two redo log files, what about control files?

Run the data dictionary script

After the database is created, the system generates two administrator users sys and

Run 3 Data dictionary scripts

Catalog.sql Create System-common data dictionary views and synonyms (SYS logins);
Catproc.sql establishes the use environment for PL/SQL functionality and creates several PL/SQL packages to extend the RDBMS functionality (SYS login);
Pupbld.sql required when using Sql*plus environment (System login)
Enter the absolute path of the @ Plus script file at the command line

The second script process is the same as the first

Executing a third script requires switching to system users

Connect System/manager
@ C:\oracle\product\10.2.0\db_2\sqlplus\admin\pupbld.sql

Create Scott Mode

@ C:\oracle\product\10.2.0\db_2\RDBMS\ADMIN\scott.sql

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.