oracle11g creating a Database method manually

Source: Internet
Author: User

oracle11g Creating a database method manually

Reference page http://www.th7.cn/db/Oracle/201311/36926.shtml

Installation path

My installation path is:E:\app\admin\product\11.2.0\dbhome_1

DATABASE name, instance name, and Oracle_sid: The names are all mydb.

Passwords for users such as SYS and system: 123456

1: Create a folder

2: Create initialization parameter file

3: Create the Execute Build library script

4: Setting Environment variables

5: Create an instance

6: Create password file

7: Start Database Nomount status

8: Execute the Build library script Mydb.sql (Mydb.sql in the e-disk directory)

9: Run script to create a data dictionary to try to

1: Create a folder

If access is denied, the reason is Win7 to run as administrator.

2: Create initialization parameter file

Copy the init.ora file to the desktop and then name it Initmydb.ora and copy it to

E:\app\admin\product\11.2.0\dbhome_1\database

The contents are as follows:

#

# $Header: Rdbms/admin/init.ora/main/23 2009/05/15 13:35:38 ysarig EXP $

#

# Copyright (c) 1991, 1997, 1998 by Oracle Corporation

# NAME

# Init.ora

# FUNCTION

# NOTES

# MODIFIED

# Ysarig 05/14/09-updating compatible to 11.2

# Ysarig 08/13/07-fixing the sample for 11g

# Atsukerm 08/06/98-fix for 8.1.

# Hpiao 06/05/97-fix for 803

# Glavash 05/12/97-add oracle_trace_enable Comment

# Hpiao 04/22/97-remove ifile=, events=, etc.

# Alingelb 09/19/94-remove vms-specific Stuff

# Dpawson 07/07/93-add More comments regarded archive start

# Maporter 10/29/92-add vms_sga_use_gblpagfile=true

# Jloaiza 03/07/92-change ALPHA to BETA

# Danderso 02/26/92-change Db_block_cache_protect to _db_block_cache_p

# Ghallmar 02/03/92-db_directory-Db_domain

# maporter 01/12/92-merge changes from branch 1.8.308.1

# maporter 12/21/91-bug 76493:add control_files parameter

# Wbridge 12/03/91-use of%c in archive format is discouraged

# Ghallmar 12/02/91-add global_names=true, db_directory=us.acme.com

# Thayes 11/27/91-change Default for Cache_clone

# Jloaiza 08/13/91-merge changes from branch 1.7.100.1

# Jloaiza 07/31/91-add Debug Stuff

# Rlim 04/29/91-removal of Char_is_varchar2

# Bridge 03/12/91-log_allocation no longer exists

# Wijaya 02/05/91-remove Obsolete parameters

#

##############################################################################

# Example INIT. ORA file

#

# This file was provided by Oracle Corporation to help you start by providing

# A starting point-to-Customize your RDBMS installation for your site.

#

# note:the values that is used in the this file is only intended to be used

# as a starting point. Want to adjust/tune those values to your

# Specific hardware and needs. Also consider using Database

# Configuration Assistant Tool (DBCA) to the Create INIT file and to size your

# Initial set of tablespaces based on the user input.

###############################################################################

# change ' <ORACLE_BASE> ' to point to the ORACLE BASE (the one for specify at

# install time)

Db_name= 'MYDB'

memory_target=1g

processes = 150

audit_file_dest= 'e:/app/admin/product/11.2.0/dbhome_1/admin/mydb/adump '

Audit_trail = ' db '

db_block_size=8192

Db_domain= "

Db_recovery_file_dest= 'e:/app/admin/flash_recovery_area'

db_recovery_file_dest_size=2g

diagnostic_dest=' E:\app\admin\product\11.2.0\dbhome_1\oradata '

Dispatchers= ' (protocol=tcp) (SERVICE=ORCLXDB) '

open_cursors=300

Remote_login_passwordfile= ' EXCLUSIVE '

Undo_tablespace= ' UNDOTBS1 '

# want to ensure that control files is created on separate physical

# devices

Control_files = (ora_control1, ora_control2)

compatible = ' 11.2.0 '

3: Create a Build library script

The content of the new text file is as follows:

Create DATABASE MYDB

DataFile ' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/system01.dbf ' size 300M reuse autoextend on Next 10240K MaxSize Unlimited

Extent Management Local

Sysaux datafile ' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/sysaux01.dbf ' size 120M reuse autoextend On next 10240K MaxSize Unlimited

Default Temporary Tablespace Temp

Tempfile ' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/temp01.dbf ' size 20M reuse autoextend on Next 640K MaxSize Unlimited

Undo Tablespace "UNDOTBS1"

DataFile ' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/undotbs1.dbf ' size 20M reuse autoextend on Next 5120K MaxSize Unlimited

LogFile

Group 1 (' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/redo01.log ') size 10M,

Group 2 (' e:/app/admin/product/11.2.0/dbhome_1/oradata/MYDB/redo02.log ') size 10M,

Group 3 (' e:/app/admin/product/11.2.0/dbhome_1/oradata/mydb/redo03.log ') size 10M;

Then save as . SQL format

4: Setting Environment variables

Set Oracle_sid=mydb

5: Create an instance

Oradim-new-sid MYDB

6: Create password file

Orapwd File=e:\app\admin\product\11.2.0\dbhome_1\database\pwdmydb.ora password=123456 entries=2

7: Start Database Nomount status

Sqlplus/nolog

Conn Sys/abcdef as Sysdba

Startup Nomount

8: Execute script mydb.sql (mydb.sql in e-disk directory)

@ E:\MYDB.sql;

9: Run script to create a data dictionary view

Sql>@e:\app\admin\product\11.2.0\dbhome_1\rdbms\admin\catalog.sql

Sql>@e:\app\admin\product\11.2.0\dbhome_1\rdbms\admin\catproc.sql

oracle11g creating a Database method manually

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.