select count(*) from dba_objects where status='INVALID' and owner in ('SYS','SYSTEM');
为0
我的建库步骤:
connect SYS/change_on_install as SYSDBA
set echo on
spool /oracle/app/oracle/admin/fjdc/create/CreateDB.log
startup nomount pfile="/oracle/app/oracle/product/9.2.0/dbs/initfjdc.ora";
CREATE DATABASE fjdc
CONTROLFILE REUSE
MAXINSTANCES 1
MAXLOGHISTORY 1
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 800
NOARCHIVELOG
CHARACTER SET ZHS16CGB231280
NATIONAL CHARACTER SET UTF8
LOGFILE GROUP 1 ('/dev/vx/rdsk/fjdcdb01/redolog1a','/dev/vx/rdsk/fjdcdb01/redolog1b') SIZE 500M reuse,
GROUP 2 ('/dev/vx/rdsk/fjdcdb01/redolog2a','/dev/vx/rdsk/fjdcdb01/redolog2b') SIZE 500M reuse,
GROUP 3 ('/dev/vx/rdsk/fjdcdb01/redolog3a','/dev/vx/rdsk/fjdcdb01/redolog3b') SIZE 500M reuse,
GROUP 4 ('/dev/vx/rdsk/fjdcdb01/redolog4a','/dev/vx/rdsk/fjdcdb01/redolog4b') SIZE 500M reuse,
GROUP 5 ('/dev/vx/rdsk/fjdcdb01/redolog5a','/dev/vx/rdsk/fjdcdb01/redolog5b') SIZE 500M reuse
DATAFILE '/dev/vx/rdsk/fjdcdb01/system01' SIZE 1024M REUSE AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/dev/vx/rdsk/fjdcdb01/temp01' SIZE 16384M REUSE AUTOEXTEND OFF
UNDO TABLESPACE UNDOTBS DATAFILE '/dev/vx/rdsk/fjdcdb01/undotbs01' SIZE 16384M REUSE AUTOEXTEND OFF
spool off
exit;
connect SYS/change_on_install as SYSDBA
set echo on
spool /oracle/app/oracle/product/9.2.0/assistants/dbca/logs/CreateDBCatalog.log
@/oracle/app/oracle/product/9.2.0/rdbms/admin/catalog.sql;
@/oracle/app/oracle/product/9.2.0/rdbms/admin/catexp7.sql;
@/oracle/app/oracle/product/9.2.0/rdbms/admin/catblock.sql;
@/oracle/app/oracle/product/9.2.0/rdbms/admin/catproc.sql;
@/oracle/app/oracle/product/9.2.0/rdbms/admin/catoctk.sql;
@/oracle/app/oracle/product/9.2.0/rdbms/admin/owminst.plb;
spool off
exit;
最后创建表空间:
connect SYS/change_on_install as SYSDBA
set echo on
spool /oracle/app/oracle/admin/fjdc/create/CreateDBFiles.log
CREATE TABLESPACE tools
DATAFILE '/dev/vx/rdsk/fjdcdb01/tools01' SIZE 100M extent management local
segment space management auto;
CREATE TABLESPACE users
DATAFILE '/dev/vx/rdsk/fjdcdb01/users01' SIZE 100M extent management local
segment space management auto;
CREATE TABLESPACE factdbs01
DATAFILE '/dev/vx/rdsk/fjdcdb01/factdbs011' SIZE 32768M extent management local
segment space management auto;
CREATE TABLESPACE factdbs02
DATAFILE '/dev/vx/rdsk/fjdcdb01/factdbs021' SIZE 32768M extent management local
segment space management auto;
。。。。。。。。。。。。。。。。。。。。。。。
你觉得有问题吗