Oracle 手工建立数据库
2009-07-08 10:43
405 查看
使用OMF手工创建数据库
测试环境:solaris10+Oracle 10G
第一步:
设置环境变量ORACLE_SID 可以通过直接修改 参数文件 也可以 export ORACLE_SID=xxxx
第二步:
建立目录:
adump dbump cdump udump pfile
第三步: 建立 参数文件
在pfile下面建立参数文件:
下面是我的参数文件
##############################################################################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
##############################################################################
###########################################
# Cache and I/O
###########################################
db_block_size=8192
db_file_multiblock_read_count=32
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Database Identification
###########################################
db_domain=""
db_name=mydb
################################
timed_statistics=false
###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/bdump
core_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/cdump
user_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/udump
###########################################
# File Configuration
###########################################
control_files=("/seconddisk/root/oracle/product/10.2.0/oradata/mydb/control01.ctl", "/seconddisk/root/oracle/product/10.2.0/oradata/mydb/control02.ctl", "/thirddisk/root/controlbackup/control03.ctl","/fourthdisk/root/controlbackup/control04.ctl")
db_recovery_file_dest=/seconddisk/root/oracle/product/10.2.0/db_1/flash_recovery_area
db_recovery_file_dest_size=2147483648
###########################################
# Job Queues
###########################################
job_queue_processes=10
###########################################
# Miscellaneous
###########################################
compatible=10.2.0.2.0
###########################################
# Optimizer
###########################################
star_transformation_enabled=TRUE
############################
utl_file_dir=/thirddisk/root/utl_dir/dir_loganaly
###########################################
# Processes and Sessions
###########################################
processes=150
###########################################
# SGA Memory
###########################################
sga_target=262144000
#########################
#OMF
db_create_file_dest= /seconddisk/root/oracle/product/10.2.0/oradata/mydb
db_create_online_log_dest_1=/thirddisk/root/redolog
db_create_online_log_dest_2=/fourthdisk/root/redolog
###########################################
# Security and Auditing
###########################################
audit_file_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/adump
remote_login_passwordfile=EXCLUSIVE
###########################################
# Shared Server
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=mydbXDB)"
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=87031808
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_tablespace=UNDOTBS1
#########################
#archive
log_archive_format=%t_%s_%r.dbf
#log_archive_dest='location=/seconddisk/root/oracle/product/10.2.0/oradata/archivedoc'
log_archive_dest_1="location=/thirddisk/root/archivedest"
log_archive_dest_2="location=/fourthdisk/root/archivedest"
第四步:
启动sqlplus
starup pfile='/xxx/xx/xxx/init.ora'
第五步:
执行准备号的脚本
create database mydb
maxlogfiles 10
maxloghistory 2
maxdatafiles 16
maxinstances 5
maxlogmembers 5
logfile
group 1 size 100M,
group 2 size 100M,
group 3 size 100M
datafile 'system01.dbf' size 200M autoextend on next 5M
sysaux datafile 'sysaux.dbf' size 200M
default temporary tablespace temp tempfile 'temp.dbf' size 50M autoextend on next 1m maxsize unlimited
undo tablespace undotbs1 datafile 'undotbs1.dbf' size 50M autoextend on next 1M maxsize unlimited
character set ZHS16GBK
/
第六步:
创建数据字典:
执行:catalog.sql catproc.sql catexp.sql
OK 数据库创建完成了
完成后 发现 我的 数据文件 .dbf的 怎么到了db_1/dbs目录下了
下面 进行一次 数据文件迁移,首先
shutdown immediate 然后
startup mount 然后
alter database archivelog 运行归档模式 然后
打开数据库 alter database open;然后
启动归档 archive log start 然后
alter databae begin backup 然后
! cp ....
alter databae end backup
alter system archive log current;
shutdown immediate
startup mount
alter database rename file .. to file
然后 执行介质恢复
reconver database
然后 执行 打开数据库 alter database open
OK了
本文出自 “谦受益” 博客,转载请与作者联系!
测试环境:solaris10+Oracle 10G
第一步:
设置环境变量ORACLE_SID 可以通过直接修改 参数文件 也可以 export ORACLE_SID=xxxx
第二步:
建立目录:
adump dbump cdump udump pfile
第三步: 建立 参数文件
在pfile下面建立参数文件:
下面是我的参数文件
##############################################################################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
##############################################################################
###########################################
# Cache and I/O
###########################################
db_block_size=8192
db_file_multiblock_read_count=32
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Database Identification
###########################################
db_domain=""
db_name=mydb
################################
timed_statistics=false
###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/bdump
core_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/cdump
user_dump_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/udump
###########################################
# File Configuration
###########################################
control_files=("/seconddisk/root/oracle/product/10.2.0/oradata/mydb/control01.ctl", "/seconddisk/root/oracle/product/10.2.0/oradata/mydb/control02.ctl", "/thirddisk/root/controlbackup/control03.ctl","/fourthdisk/root/controlbackup/control04.ctl")
db_recovery_file_dest=/seconddisk/root/oracle/product/10.2.0/db_1/flash_recovery_area
db_recovery_file_dest_size=2147483648
###########################################
# Job Queues
###########################################
job_queue_processes=10
###########################################
# Miscellaneous
###########################################
compatible=10.2.0.2.0
###########################################
# Optimizer
###########################################
star_transformation_enabled=TRUE
############################
utl_file_dir=/thirddisk/root/utl_dir/dir_loganaly
###########################################
# Processes and Sessions
###########################################
processes=150
###########################################
# SGA Memory
###########################################
sga_target=262144000
#########################
#OMF
db_create_file_dest= /seconddisk/root/oracle/product/10.2.0/oradata/mydb
db_create_online_log_dest_1=/thirddisk/root/redolog
db_create_online_log_dest_2=/fourthdisk/root/redolog
###########################################
# Security and Auditing
###########################################
audit_file_dest=/seconddisk/root/oracle/product/10.2.0/db_1/admin/mydb/adump
remote_login_passwordfile=EXCLUSIVE
###########################################
# Shared Server
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=mydbXDB)"
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=87031808
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_tablespace=UNDOTBS1
#########################
#archive
log_archive_format=%t_%s_%r.dbf
#log_archive_dest='location=/seconddisk/root/oracle/product/10.2.0/oradata/archivedoc'
log_archive_dest_1="location=/thirddisk/root/archivedest"
log_archive_dest_2="location=/fourthdisk/root/archivedest"
第四步:
启动sqlplus
starup pfile='/xxx/xx/xxx/init.ora'
第五步:
执行准备号的脚本
create database mydb
maxlogfiles 10
maxloghistory 2
maxdatafiles 16
maxinstances 5
maxlogmembers 5
logfile
group 1 size 100M,
group 2 size 100M,
group 3 size 100M
datafile 'system01.dbf' size 200M autoextend on next 5M
sysaux datafile 'sysaux.dbf' size 200M
default temporary tablespace temp tempfile 'temp.dbf' size 50M autoextend on next 1m maxsize unlimited
undo tablespace undotbs1 datafile 'undotbs1.dbf' size 50M autoextend on next 1M maxsize unlimited
character set ZHS16GBK
/
第六步:
创建数据字典:
执行:catalog.sql catproc.sql catexp.sql
OK 数据库创建完成了
完成后 发现 我的 数据文件 .dbf的 怎么到了db_1/dbs目录下了
下面 进行一次 数据文件迁移,首先
shutdown immediate 然后
startup mount 然后
alter database archivelog 运行归档模式 然后
打开数据库 alter database open;然后
启动归档 archive log start 然后
alter databae begin backup 然后
! cp ....
alter databae end backup
alter system archive log current;
shutdown immediate
startup mount
alter database rename file .. to file
然后 执行介质恢复
reconver database
然后 执行 打开数据库 alter database open
OK了
本文出自 “谦受益” 博客,转载请与作者联系!
相关文章推荐
- oracle xe 手工建立ZHS16GBK字符集数据库
- Oracle手工建立数据库的完整步骤
- Oracle DBA 手工建立数据库
- oracle 手工建立 数据库的方法
- 在oracle 10.2 for solaris上手工建立第2个数据库并访问的办法
- Oracle 11g(11.2.0) 手工建立数据库
- 手工建立oracle复制数据库
- 详解:数据库名、实例名、ORACLE_SID、数据库域名、全局数据库名、服务名及手工脚本创建oracle数据库
- Oracle管理与维护.手工创建数据库以及脚本
- Oracle 10g手工建立ASM磁盘组错误之--ORA-15201
- Oracle 11.2命令行手工最简创建数据库的过程
- ORACLE 10G R1手工创建数据库步骤
- 详解:数据库名、实例名、ORACLE_SID、数据库域名、全局数据库名、服务名及手工脚本创建oracle数据库
- Oracle 10g手工建立ASM磁盘组错误之--ORA-15201
- PowerDesigner建立与数据库的连接,以便生成数据库和从数据库生成到PD中。[Oracle 10G版]
- 在oracle中建立dblink访问其他数据库
- Oracle 10G手工创建数据库(Helloblock写作)
- 【转】oracle建立本地数据库
- 详解:数据库名、实例名、ORACLE_SID、数据库域名、全局数据库名、服务名及手工脚本创建oracle数据库
- oracle 建立数据库