注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

伯纳乌の夢

可以挽回么?我们按“ Ctrl+Z”撤销掉吧。对不起啦~~

 
 
 

日志

 
 
 
 

[Forward]Manually Creating an Oracle Database on Windows  

2009-08-18 22:26:45|  分类: Oracle/SQLServer |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

TrackBack: http://www.dbapool.com/articles/111605.html

Manually Creating an Oracle Database on Windows

Below are the steps involved in manual database creation on Windows.

Steps in Database creation

Step 1: Decide on Your Instance Identifier (SID)
Step 2: Create the Initialization Parameter File
Step 3: Start the Instance.
Step 4: Issue the CREATE DATABASE Statement
Step 5: Create Additional Tablespaces
Step 6: Run Scripts to Build Data Dictionary Views

Step 1: Decide on Your Instance Identifier (SID)

Create a new service name using comment prompt
C:/>oradim -new 杝id john 杋ntpwd nive
(For help about oradim, type oradim/? In comment prompt)
Set the sid


Step 2: Create the Initialization Parameter File

Create init.ora file for your database
Or
Copy existing database init.ora parameter file and change the pathes in init.ora file

You should change the following parameters
db_name=jooo
instance_name=john (match with you already created sid)
log_archive_dest_1='LOCATION=D:\oracle\jooo\archive'
background_dump_dest=D:\oracle\jooo\bdump
core_dump_dest=D:\oracle\jooo\cdump user_dump_dest=D:\oracle\jooo\ ump
control_files= ("D:\oracle\jooo\oradata\control01.ctl", "D:\oracle\jooo\oradata\control02.ctl", "D:\oracle\jooo\oradata\control03.ctl")

Step 3: Start the Instance.

In comment prompt
C:\>set ora_sid=john
C:\>sqlplus /nolog

Start an instance without mounting a database
Sql> startup nomount pfile=抣ocation?

Step 4: Issue the CREATE DATABASE Statement

When you execute a CREATE DATABASE statement, Oracle performs (at least) the following 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 SYSTEM tablespace and the SYSTEM rollback segment
  • Creates the data dictionary
  • Sets the character set that stores data in the database
  • Sets the database time zone
  • Mounts and opens the database for use

The general format follows:

CREATE DATABASE [database name]
[CONTROLFILE REUSE]
[LOGFILE [GROUP integer] file specification]
[MAXLOGFILES integer]
[MAXLOGMEMBERS integer]
[MAXLOGHISTORY integer]
[MAXDATAFILES integer]
[MAXINSTANCES integer]
[ARCHIVELOG|NOARCHIVELOG]
[CHARACTER SET charset]
[NATIONAL CHARACTER SET charset]
[DATAFILE filespec [autoextend]]
[DEFAULT TEMPORARY TABLESPACE tablespace filespec]
[UNDO TABLESPACE tablespace DATAFILE filespec]
[SET TIME_ZONE [time_zone_region]];

Example

CREATE DATABASE jooo
MAXINSTANCES 1
MAXLOGHISTORY 1
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
DATAFILE
'd:\oracle\jooo\oradata\system01.dbf' SIZE 325M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
LOGFILE
GROUP 1 ('d:\oracle\jooo\oradata\redo01.log') SIZE 100M,
GROUP 2 ('d:\oracle\jooo\oradata\redo02.log') SIZE 100M
UNDO TABLESPACE "UNDOTBS1"
DATAFILE 'd:\oracle\jooo\oradata\undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8MSWIN1252
NATIONAL CHARACTER SET AL16UTF16;

Step 5:

Create temprory tablespace and user tablespace.

Step 6: Run Scripts to Build Data Dictionary Views

Run the scripts necessary to build views, synonyms, and PL/SQL packages

@/vobs/oracle/rdbms/admin/catalog.sql
@/vobs/oracle/rdbms/admin/catproc.sql

Script Description

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 R
It runs all scripts required for or used with PL/SQL.


OTHER OPTIONAL WORKS

  • Specifying the Database Time Zone
  • Specifying Passwords for Users SYS and SYSTEM
  • CREATE DATABASE rbdb1
  • USER SYS IDENTIFIED BY pz6r58
  • USER SYSTEM IDENTIFIED BY y1tz5p
  • Specifying FORCE LOGGING Mode
  • Creating a Server Parameter File
Other important packages

catexp7.sql
Create v7 style export/import views against the v8 RDBMS

catblock.sql
create views of oracle locks.

catoctk.sql
Oracle Cryptographic ToolKit.

catobtk.sql
Contains scripts needed to use the PL/SQL Obfuscation Toolkit.

caths.sql
Create Heterogeneous Services data dictionary objects.

owminst.plb
create user ovm_sys for storing metadata. This will help in database export.

附上精彩的视频:http://v.youku.com/v_show/id_XMTM1NTA5MDQ=.html
  评论这张
 
阅读(148)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017