Oracle 11g (11.2.0) manual database creation

Source: Internet
Author: User

Oracle 11g (11.2.0) manual database creation various versions on the Internet are unsightly behind, and their own searches are exploding, but Li Zheng discussed some
I still know that no matter how good I know it, it is better to cooperate with multiple people and chat more. This small experiment
It took neng a day to get rid of all sorts of bad breath, and it won't be able to eliminate the depressing.
The created database sid = tian
Www.2cto.com
1. Create related directories (data files and tracking files)
Create a tian folder under the directory C: \ app \ muxi \ admin
Create the bdump folder under the directory C: \ app \ muxi \ admin \ tian
Create a udump folder under the directory C: \ app \ muxi \ admin \ tian
Create a pfile folder under the directory C: \ app \ muxi \ admin \ tian
Create a cdump folder under the directory C: \ app \ muxi \ admin \ tian
Create a folder under the directory C: \ app \ muxi \ admin \ tian
Create a tian folder in the directory C: \ app \ muxi \ oradata



2. Create an initialization parameter file
By copying the existing initialization parameter file C: \ app \ muxi \ admin \ orcl \ pfile
To the C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ database directory
Change the name of inittian. ora and use NotePad to open the parameter file. Modify the following parameters:
(The red part is written to the sid of the database ):



######################################## ####################
#################
# Copyright (c) 1991,200 1, 2002 by Oracle Corporation
######################################## ####################
 
######################################## ###
# Shared Server
######################################## ###
Dispatchers = "(PROTOCOL = TCP) (SERVICE = tianXDB )"
 
######################################## ###
# Miscellaneous
######################################## ###
Compatible = 11.2.0.0.0
Diagnostic_dest = C: \ app \ muxi
Memory_target = 792723456
 
######################################## ###
# Security and Auditing
######################################## ###
Audit_file_dest = C: \ app \ muxi \ admin \ tian \ adump
Audit_trail = db
Remote_login_passwordfile = EXCLUSIVE
 
######################################## ###
# Database Identification
######################################## ###
Db_domain = dbteach.edu.cn
Db_name = tian
 
######################################## ###
# File Configuration
######################################## ###
Control_files = ("C: \ app \ muxi \ oradata \ tian \ control01.ctl", "C: \ app \
Muxi \ flash_recovery_area \ tian \ control02.ctl ")
Db_recovery_file_dest = C: \ app \ muxi \ flash_recovery_area
Db_recovery_file_dest_size = 4039114752
 
######################################## ###
# Cursors and Library Cache
######################################## ###
Open_cursors = 300
 
######################################## ###
# System Managed Undo and Rollback Segments
######################################## ###
Undo_tablespace = UNDOTBS1
 
######################################## ###
# Processes and Sessions
######################################## ###
Processes = 150
 
######################################## ###
# Cache and I/O
######################################## ###
DB _ block_size = 8192
 
 
3. Set environment variables:
Set oracle_sid = tian

4. Create a service:
Oradim-new-sid tian

5. Create a password file
Orapwd file = C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ database \ pwdtian. ora
Password0000123((.exe cmd .exe)

6. Start the server:
Sqlplus/nolog
Conn/as sysdba
Startup nomount



If the above status occurs, shutdown and start again. The specific principle is not understood.


This status is correct


These steps are complete.


7. Execute the database creation script:
Create database tian
Datafile 'C: \ app \ muxi \ oradata \ tian \ system01.dbf 'size 300 m
Autoextend on next 10 m extent management local
Sysaux datafile 'C: \ app \ muxi \ oradata \ tian \ sysaux01.dbf' size 120 m
Undo tablespace undotbs1
Datafile 'C: \ app \ muxi \ oradata \ tian \ undotbs01.dbf' size 100 m
Default temporary tablespace temptbs1
Tempfile 'C: \ app \ muxi \ oradata \ tian \ temp01.dbf' size 50 m
Logfile group 1
('C: \ app \ muxi \ oradata \ tian \ redo01.log') size 50 m,
Group 2
('C: \ app \ muxi \ oradata \ tian \ redo02.log ') size 50 m,
Group 3
('C: \ app \ muxi \ oradata \ tian \ redo03.log') size 50 m;
Use NotePad to edit the preceding content. Assume that createDB. SQL is saved in the C root directory,
Then execute the script
Start c: \ createDB. SQL (do not press ENTER For A Long Time)
Regardless of the error, delete the one created in the D: \ app \ you \ oradata \ tian directory.
After the error is corrected, restart the instance and run the database creation script. Otherwise
The following error occurs:

In addition, if the following error occurs, add a folder.
Tian folder)

After the manual creation is successful

8. Create data dictionaries and packages
Start C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ RDBMS \ ADMIN \ catalog

Start C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ RDBMS \ ADMIN \ catproc



9. Run the pupbld. SQL script file.
Switch to system user for execution
Conn system/manager
Start C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ RDBMS \ ADMIN \ pupbld

10. Execute the scott script to create the scott mode.
Start C: \ app \ muxi \ product \ 11.2.0 \ dbhome_1 \ RDBMS \ ADMIN \ scott. SQL
In this case, you need to change the password
Conn/as sysdba
Alter user scott identified by 123;
Connect scott
Conn scott/123

11. select * from dept;

12. Subsequent small tests

13. Finished

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.