如何手工创建Oracle数据库
2008-01-06 12:41:11 来源:WEB开发网今天,我在测试机器上来了个误操作rm * backup/*,把正在运行的数据库中的数据文件全部删除了,真是郁闷!还好这个是给我们新人们测试玩的,要不然就死定了!在此也做一个提醒,身为DBA,要永远记住什么慎用或者禁止使用rm命令,万不得以的情况下,使用时在敲enter也要看了又看、慎重又慎重才行!好了,费话不说了,下面请看我的过程。
Red Hat Enterprise 3 + Oracle 10g Release 2
$su – oracle
1、设置系统环境变量
ORACLE_HOME=/opt/oracle/product/10.2
ORACLE_BASE=/opt/oracle
ORACLE_SID=dbtest
......
2、系统规划
实例名称ORACLE_SID=dbtest
数据库名称DB_NAME=dbtest
3、手工创建如下目录
/opt/oracle/admin/dbtest/cdump
/opt/oracle/admin/dbtest/bdump
/opt/oracle/admin/dbtest/udump
/opt/oracle/admin/dbtest/pfile
/opt/oracle/oradata/dbtest/
/opt/oracle/oradata/dbtest/archive
4、建立密码文件
orapwd file=/opt/oracle/product/10.2/dbs/orapwd_dbtest password=superman
5、修改参数文件
格式:/opt/oracle/product/10.2/dbs/init.ora
实例:/opt/oracle/product/10.2/dbs/initdbtest.ora
内容如下:
dbtest.__db_cache_size=331350016
dbtest.__java_pool_size=4194304
dbtest.__large_pool_size=8388608
dbtest.__shared_pool_size=138412032
dbtest.__streams_pool_size=0
*._kgl_large_heap_warning_threshold=8388608
*.audit_file_dest='/opt/oracle/admin/dbtest/adump'
*.background_dump_dest='/opt/oracle/admin/dbtest/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/opt/oracle/oradata/dbtest/control01.ctl',
'/opt/oracle/oradata/dbtest/control02.ctl',
'/opt/oracle/oradata/dbtest/control03.ctl'
*.core_dump_dest='/opt/oracle/admin/dbtest/cdump'
*.db_2k_cache_size=33554432
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=128
*.db_files=4000
*.db_name='dbtest'
*.db_recovery_file_dest_size=4294967296
*.db_recovery_file_dest=''
*.log_archive_dest='/opt/oracle/oradata/dbtest/archive'
*.log_checkpoints_to_alert=FALSE
*.open_cursors=300
*.parallel_execution_message_size=65535
*.parallel_max_servers=128
*.pga_aggregate_target=209715200
*.processes=150
*.recyclebin='OFF'
*.remote_login_passwordfile='EXCLUSIVE'
*.replication_dependency_tracking=FALSE
*.session_cached_cursors=100
*.sga_target=500m
*.shared_pool_size=100m
*.undo_management='AUTO'
*.undo_retention=0
*.undo_tablespace='UNDOTS'
*.user_dump_dest='/opt/oracle/admin/dbtest/udump'
*.workarea_size_policy='AUTO'
_allow_resetlogs_corruption=true
更多精彩
赞助商链接