分享
 
 
 

rem--创建回滚段

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

CREATE PUBLIC ROLLBACK SEGMENT RBS0 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS1 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS2 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS3 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS4 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS5 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS6 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS7 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS8 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS9 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS10 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS11 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS12 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS13 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS14 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS15 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS16 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS17 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS18 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS19 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS20 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS21 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS22 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS23 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

CREATE PUBLIC ROLLBACK SEGMENT RBS24 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );

rem --使回滚段在线

ALTER ROLLBACK SEGMENT "RBS0" ONLINE;

ALTER ROLLBACK SEGMENT "RBS1" ONLINE;

ALTER ROLLBACK SEGMENT "RBS2" ONLINE;

ALTER ROLLBACK SEGMENT "RBS3" ONLINE;

ALTER ROLLBACK SEGMENT "RBS4" ONLINE;

ALTER ROLLBACK SEGMENT "RBS5" ONLINE;

ALTER ROLLBACK SEGMENT "RBS6" ONLINE;

ALTER ROLLBACK SEGMENT "RBS7" ONLINE;

ALTER ROLLBACK SEGMENT "RBS8" ONLINE;

ALTER ROLLBACK SEGMENT "RBS9" ONLINE;

ALTER ROLLBACK SEGMENT "RBS10" ONLINE;

ALTER ROLLBACK SEGMENT "RBS11" ONLINE;

ALTER ROLLBACK SEGMENT "RBS12" ONLINE;

ALTER ROLLBACK SEGMENT "RBS13" ONLINE;

ALTER ROLLBACK SEGMENT "RBS14" ONLINE;

ALTER ROLLBACK SEGMENT "RBS15" ONLINE;

ALTER ROLLBACK SEGMENT "RBS16" ONLINE;

ALTER ROLLBACK SEGMENT "RBS17" ONLINE;

ALTER ROLLBACK SEGMENT "RBS18" ONLINE;

ALTER ROLLBACK SEGMENT "RBS19" ONLINE;

ALTER ROLLBACK SEGMENT "RBS20" ONLINE;

ALTER ROLLBACK SEGMENT "RBS21" ONLINE;

ALTER ROLLBACK SEGMENT "RBS22" ONLINE;

ALTER ROLLBACK SEGMENT "RBS23" ONLINE;

ALTER ROLLBACK SEGMENT "RBS24" ONLINE;

rem --修改sys用户的临时表空间为TEMP

alter user sys temporary tablespace TEMP;

rem --创建数据字典表

connect system/manager

@$ORACLE_HOME/rdbms/admin/catdbsyn.sql

connect internal

@/data/ora816/rdbms/admin/catalog.sql;

@/data/ora816/rdbms/admin/catexp7.sql

@/data/ora816/rdbms/admin/catproc.sql

@/data/ora816/rdbms/admin/caths.sql

connect system/manager

@/data/ora816/sqlplus/admin/pupbld.sql

connect internal/oracle

@/data/ora816/rdbms/admin/catrep.sql

rem --修改system用户默认表空间和临时表空间

alter user system default tablespace SYSTEM;

alter user system temporary tablespace TEMP;

spool off

rem 脚本结束

7、执行脚本

您可以进行执行脚本了,转到目录:$ORACLE_HOME/dbs中去,并且将上面的create_db.sql也放到此目录中,下面开始了:

键入命令:svrmgrl回车

SVRMGRconnect internal

connected.

SVRMGRstartup回车

SVRMGR@create_db.sql回车(ok,下面您就可以看到屏幕在不断的显时操作过程,大概需要半个多小时的时间或许还要长一点点)。

执行完毕之后您可能需要退出去

SVRMGRexit

没有错误的话,现在您的数据库已经生成了。

8、生成SQL*Plus帮助系统

sqlplus SYSTEM/manager

@/data/ora816/sqlplus/admin/help/helpbld.sql helpus.sql

9、部分说明

1)、create database web

datafile '$ORACLE_HOME/oradata/web/web_syst_01.dbf' size 500M reuse

logfile

'$ORACLE_HOME/oradata/web/web_redo_01.dbf' size 10M reuse,

'$ORACLE_HOME/oradata/web/web_redo_02.dbf' size 10M reuse,

'$ORACLE_HOME/oradata/web/web_redo_03.dbf' size 10M reuse

请注意看一下生成的文件名字:web_syst_01.dbf,web_redo_01.dbf,web_redo_02.dbf,web_redo_03.dbf,请注意将您的sid换成相应的部分,在我的例子中我的sid是web。

另外还有生成表空间时的几个文件:

create tablespace rollback

datafile '$ORACLE_HOME/dbs/web_roll_01.dbf' size 8M reuse;

create tablespace temp

datafile '$ORACLE_HOME/dbs/web_temp_01.dbf' size 5M reuse

temporary;

create tablespace users

datafile '$ORACLE_HOME/dbs/web_user_01.dbf' size 10M reuse;

最好也要改成相应的名字

2)、connect system/manager

@$ORACLE_HOME/rdbms/admin/catdbsyn.sql

connect internal

@$ORACLE_HOME/rdbms/admin/catproc.sql

connect system/manager

@$ORACLE_HOME/sqlplus/admin/pupbld.sql

其中的connect system/manager 是假设您的system账号的密码就是manager(系统默认的),如果您通过alter user system identified by 修改了密码,请换成正确的密码登录。

3)、initweb.ora文件内容:

db_name = "web"

instance_name = web

service_names = web.edi.com

db_files = 1024

control_files = ("/data/ora816/oradata/web/control01.ctl", "/data/ora816/oradata/web/control02.ctl", "/d

ata/ora816/oradata/web/control03.ctl")

open_cursors = 200

max_enabled_roles = 30

db_file_multiblock_read_count = 8

db_block_buffers = 4096

shared_pool_size = 52428800

large_pool_size = 78643200

java_pool_size = 20971520

log_checkpoint_interval = 10000

log_checkpoint_timeout = 1800

processes = 115

parallel_max_servers = 5

log_buffer = 32768

max_dump_file_size = 10240

global_names = true

oracle_trace_collection_name = ""

background_dump_dest = /data/ora816/admin/web/bdump

user_dump_dest = /data/ora816/admin/web/udump

db_block_size = 16384

remote_login_passwordfile = exclusive

os_authent_prefix = ""

job_queue_processes = 4

job_queue_interval = 60

open_links = 4

distributed_transactions = 10

mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"

mts_dispatchers = "(protocol=TCP)"

compatible = 8.1.0

sort_area_size = 65536

sort_area_retained_size = 65536

# log_archive_start = true

# log_archive_dest_1 = "location=/data/ora816/oradata/oradb/archive"

# log_archive_format = %%ORACLE_SID%%T%TS%S.ARC

-------------

Excellent work!

Some additions:

7. after connect as internal, you should run your creat_db.sql. (delete that part: startup).

9- 3). In the initweb.ora, you should add rollback_segments = ( RBS0

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有