一、增加2T存储空间

1、  对磁盘进行分区并格式化

[root@oms-db01 ~]# fdisk -l

Disk /dev/sda: 322.1 GB, 322122547200 bytes

255 heads, 63 sectors/track, 39162 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14       39162   314464342+  8e  Linux LVM

Disk /dev/sdb: 2199.0 GB, 2199023255552 bytes

255 heads, 63 sectors/track, 267349 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

[root@oms-db01 ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

The number of cylinders for this disk is set to 267349.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

WARNING: The size of this disk is 2.2 TB (2199023255552 bytes).

DOS partition table format can not be used on drives for volumes

larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID

partition table format (GPT).

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-267349, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-267349, default 267349):

Using default value 267349

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@oms-db01 ~]# fdisk -l

Disk /dev/sda: 322.1 GB, 322122547200 bytes

255 heads, 63 sectors/track, 39162 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14       39162   314464342+  8e  Linux LVM

WARNING: The size of this disk is 2.2 TB (2199023255552 bytes).

DOS partition table format can not be used on drives for volumes

larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID

partition table format (GPT).

Disk /dev/sdb: 2199.0 GB, 2199023255552 bytes

255 heads, 63 sectors/track, 267349 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1      267349  2147480811   83  Linux

[root@oms-db01 /]# mkfs.ext3 /dev/sdb1

mke2fs 1.39 (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

268435456 inodes, 536870202 blocks

26843510 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

16384 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

102400000, 214990848, 512000000

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information:

done

This filesystem will be automatically checked every 35 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

2、  创建目录挂载磁盘

[root@oms-db01 /]# mkdir oradata

[root@oms-db01 /]# chown -R oracle:oisntall oradata/

[root@oms-db01 /]# mount /dev/sdb1 oradata/

[root@oms-db01 /]# df -h

文件系统              容量  已用 可用 已用% 挂载点

/dev/mapper/VolGroup00-LogVol00

274G  166G   94G  64% /

/dev/sda1              99M   13M   81M  14% /boot

tmpfs                 7.9G     0  7.9G   0% /dev/shm

/dev/sdb1             2.0T  199M  1.9T   1% /oradata

二、修改归档模式及归档日志路径

1、  修改数据库归档日志文件路径

alter system set log_archive_dest_1='location=/oradata/omsdb/archivelog';

2、  重启数据库至MOUNT状态

Shutdown immediate

Startup mount

3、  修改数据库为归档模式

Alter database archivelog

4、  打开数据库

Alter database open

三、修改数据文件路径

1、  将表空间offline

alter tablespace oms_data offline;

2、  CP数据文件到指定目录

cp /u01/app/oracle/oradata/omsdb/oms_data01.dbf /oradata/omsdb/datafiles/oms_data01.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data02.dbf /oradata/omsdb/datafiles/oms_data02.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data03.dbf /oradata/omsdb/datafiles/oms_data03.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data04.dbf /oradata/omsdb/datafiles/oms_data04.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data05.dbf /oradata/omsdb/datafiles/oms_data05.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data06.dbf /oradata/omsdb/datafiles/oms_data06.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data07.dbf /oradata/omsdb/datafiles/oms_data07.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data08.dbf /oradata/omsdb/datafiles/oms_data08.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data09.dbf /oradata/omsdb/datafiles/oms_data09.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data10.dbf /oradata/omsdb/datafiles/oms_data10.dbf

3、  修改表空间数据文件指向

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data01.dbf' to '/oradata/omsdb/datafiles/oms_data01.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data02.dbf' to '/oradata/omsdb/datafiles/oms_data02.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data03.dbf' to '/oradata/omsdb/datafiles/oms_data03.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data04.dbf' to '/oradata/omsdb/datafiles/oms_data04.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data05.dbf' to '/oradata/omsdb/datafiles/oms_data05.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data06.dbf' to '/oradata/omsdb/datafiles/oms_data06.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data07.dbf' to '/oradata/omsdb/datafiles/oms_data07.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data08.dbf' to '/oradata/omsdb/datafiles/oms_data08.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data09.dbf' to '/oradata/omsdb/datafiles/oms_data09.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data10.dbf' to '/oradata/omsdb/datafiles/oms_data10.dbf';

4、将表空间online

Alter tablespace oms_data online

四、备份数据库

Rman备份全库

五、将OMS_LOGINFOR表转换成分区表

1、创建OMS_LOGINFOR_1分区表,以REQUESTINCOMETIME字段每天分区

2、将OMS_LOGINFOR表数据写入到OMS_LOGINFOR_1

Insert into OMS_LOGINFOR_1 select * from OMS_LOGINFOR;

3、删除OMS_LOGINFOR表,再将OMS_LOGINFOR_1表重命名为OMS_LOGINFOR

Drop table OMS_LOGINFOR;

Alter table OMS_LOGINFOR_1 rename to OMS_LOGINFOR;

-- Create table

createtable OMS_LOGINFOR

(

autoid             NUMBERnotnull,

requestid          VARCHAR2(200),

customerno         VARCHAR2(64),

systemcode         VARCHAR2(64),

interfacecodeto    VARCHAR2(64),

type               VARCHAR2(20),

content            CLOB,

creator            VARCHAR2(20),

createtime         DATE,

interfacecodefor   VARCHAR2(64),

modular            VARCHAR2(20),

requestincometime  TIMESTAMP(9),

responseouttime    TIMESTAMP(9),

orlrequestdata     CLOB,

conversionrequest  CLOB,

orlresponsedata    CLOB,

conversionresponse CLOB

)

partitionbyrange (REQUESTINCOMETIME) interval (numtoyMinterval (1,' DAY '))

(

partition p_2017_03_01 valueslessthan (to_date('2017-03-01', 'yyyy-mm-dd'))

)

tablespace OMS_DATA

pctfree10

initrans1

maxtrans255

storage

(

initial64K

next8K

minextents1

maxextentsunlimited

);

-- Add comments to the table

commentontable OMS_LOGINFOR

is'日志信息表';

-- Add comments to the columns

commentoncolumn OMS_LOGINFOR.autoid

is'序列自增长';

commentoncolumn OMS_LOGINFOR.requestid

is'一次请求开始到请求结束,ID唯一';

commentoncolumn OMS_LOGINFOR.customerno

is'客户编号';

commentoncolumn OMS_LOGINFOR.systemcode

is'系统编号';

commentoncolumn OMS_LOGINFOR.interfacecodeto

is'接口编号';

commentoncolumn OMS_LOGINFOR.type

is'日志类型';

commentoncolumn OMS_LOGINFOR.content

is'日志内容';

commentoncolumn OMS_LOGINFOR.creator

is'创建人';

commentoncolumn OMS_LOGINFOR.createtime

is'日志产生时间';

commentoncolumn OMS_LOGINFOR.interfacecodefor

is'目标接口编号';

commentoncolumn OMS_LOGINFOR.modular

is'日志产生的模块';

commentoncolumn OMS_LOGINFOR.requestincometime

is'请求进入时间';

commentoncolumn OMS_LOGINFOR.responseouttime

is'请求返回时间';

commentoncolumn OMS_LOGINFOR.orlrequestdata

is'原始请求数据';

commentoncolumn OMS_LOGINFOR.conversionrequest

is'oms转换后请求数据';

commentoncolumn OMS_LOGINFOR.orlresponsedata

is'原始返回数据';

commentoncolumn OMS_LOGINFOR.conversionresponse

is'oms转换后返回数据';

-- Create/Recreate indexes

createbitmapindex IDX_OMS_LOG on OMS_LOGINFOR (INTERFACECODEFOR)

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

createindex IDX_OMS_REQTIME on OMS_LOGINFOR (REQUESTINCOMETIME)

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

-- Create/Recreate primary, unique and foreign key constraints

altertable OMS_LOGINFOR

addconstraint PK_AUTOID primarykey (AUTOID)

usingindex

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

六、调整REDO日志组文件大小

1、增加日志组:

alter database add logfile group 4 '/oradata/omsdb/onlinelog/redo04.log' size 1024M;

alter database add logfile group 5 '/oradata/omsdb/onlinelog/redo05.log' size 1024M;

alter database add logfile group 6 '/oradata/omsdb/onlinelog/redo06.log' size 1024M;

alter database add logfile group 1 '/oradata/omsdb/onlinelog/redo01.log' size 1024M;

alter database add logfile group 2 '/oradata/omsdb/onlinelog/redo02.log' size 1024M;

alter database add logfile group 3 '/oradata/omsdb/onlinelog/redo03.log' size 1024M;

4、  删除日志组:

切换日志状态:

Alter system switch logfile;

Alter system checkpoint;

删除日志:

Alter database drop logfile group 1;

Alter database drop logfile group 2;

Alter database drop logfile group 3;

5、  删除日志文件

Rm /u01/app/oracle/oradata/omsdb/redo01.log

Rm /u01/app/oracle/oradata/omsdb/redo02.log

Rm /u01/app/oracle/oradata/omsdb/redo03.log

一、增加2T存储空间

1、  对磁盘进行分区并格式化

[root@oms-db01
~]# fdisk -l

Disk
/dev/sda: 322.1 GB, 322122547200 bytes

255
heads, 63 sectors/track, 39162 cylinders

Units =
cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  
Id  System

/dev/sda1   *          
1          13      104391  
83  Linux

/dev/sda2              14       39162  
314464342+  8e  Linux LVM

Disk
/dev/sdb: 2199.0 GB, 2199023255552 bytes

255
heads, 63 sectors/track, 267349 cylinders

Units =
cylinders of 16065 * 512 = 8225280 bytes

Disk
/dev/sdb doesn't contain a valid partition table

[root@oms-db01
~]# fdisk /dev/sdb

Device
contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building
a new DOS disklabel. Changes will remain in memory only,

until you
decide to write them. After that, of course, the previous

content
won't be recoverable.

The
number of cylinders for this disk is set to 267349.

There is
nothing wrong with that, but this is larger than 1024,

and could
in certain setups cause problems with:

1)
software that runs at boot time (e.g., old versions of LILO)

2)
booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

WARNING:
The size of this disk is 2.2 TB (2199023255552 bytes).

DOS
partition table format can not be used on drives for volumes

larger
than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID

partition
table format (GPT).

Warning:
invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command
(m for help): n

Command
action

e  
extended

p  
primary partition (1-4)

p

Partition
number (1-4): 1

First
cylinder (1-267349, default 1):

Using
default value 1

Last
cylinder or +size or +sizeM or +sizeK (1-267349, default 267349):

Using
default value 267349

Command
(m for help): w

The
partition table has been altered!

Calling
ioctl() to re-read partition table.

Syncing
disks.

[root@oms-db01
~]# fdisk -l

Disk
/dev/sda: 322.1 GB, 322122547200 bytes

255
heads, 63 sectors/track, 39162 cylinders

Units =
cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  
Id  System

/dev/sda1   *          
1          13      104391  
83  Linux

/dev/sda2              14       39162  
314464342+  8e  Linux LVM

WARNING:
The size of this disk is 2.2 TB (2199023255552 bytes).

DOS
partition table format can not be used on drives for volumes

larger
than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID

partition
table format (GPT).

Disk
/dev/sdb: 2199.0 GB, 2199023255552 bytes

255 heads,
63 sectors/track, 267349 cylinders

Units =
cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  
Id  System

/dev/sdb1              
1      267349  2147480811  
83  Linux

[root@oms-db01
/]# mkfs.ext3 /dev/sdb1

mke2fs
1.39 (29-May-2006)

Filesystem
label=

OS type:
Linux

Block
size=4096 (log=2)

Fragment
size=4096 (log=2)

268435456
inodes, 536870202 blocks

26843510
blocks (5.00%) reserved for the super user

First
data block=0

Maximum
filesystem blocks=4294967296

16384
block groups

32768
blocks per group, 32768 fragments per group

16384
inodes per group

Superblock
backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200,
884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872,
71663616, 78675968,

102400000, 214990848, 512000000

Writing
inode tables: done

Creating
journal (32768 blocks): done

Writing
superblocks and filesystem accounting information:

done

This
filesystem will be automatically checked every 35 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

2、  创建目录挂载磁盘

[root@oms-db01 /]# mkdir oradata

[root@oms-db01 /]# chown -R oracle:oisntall oradata/

[root@oms-db01 /]# mount /dev/sdb1 oradata/

[root@oms-db01 /]# df -h

文件系统              容量  已用 可用 已用% 挂载点

/dev/mapper/VolGroup00-LogVol00

274G  166G  
94G  64% /

/dev/sda1              99M   13M  
81M  14% /boot

tmpfs                 7.9G     0 
7.9G   0% /dev/shm

/dev/sdb1            
2.0T  199M  1.9T   1% /oradata

二、修改归档模式及归档日志路径

1、  修改数据库归档日志文件路径

alter system set log_archive_dest_1='location=/oradata/omsdb/archivelog';

2、  重启数据库至MOUNT状态

Shutdown immediate

Startup mount

3、  修改数据库为归档模式

Alter database archivelog

4、  打开数据库

Alter database open

三、修改数据文件路径

1、  将表空间offline

alter tablespace oms_data offline;

2、  CP数据文件到指定目录

cp /u01/app/oracle/oradata/omsdb/oms_data01.dbf
/oradata/omsdb/datafiles/oms_data01.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data02.dbf
/oradata/omsdb/datafiles/oms_data02.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data03.dbf
/oradata/omsdb/datafiles/oms_data03.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data04.dbf
/oradata/omsdb/datafiles/oms_data04.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data05.dbf
/oradata/omsdb/datafiles/oms_data05.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data06.dbf
/oradata/omsdb/datafiles/oms_data06.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data07.dbf
/oradata/omsdb/datafiles/oms_data07.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data08.dbf
/oradata/omsdb/datafiles/oms_data08.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data09.dbf
/oradata/omsdb/datafiles/oms_data09.dbf

cp /u01/app/oracle/oradata/omsdb/oms_data10.dbf
/oradata/omsdb/datafiles/oms_data10.dbf

3、  修改表空间数据文件指向

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data01.dbf' to '/oradata/omsdb/datafiles/oms_data01.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data02.dbf' to
'/oradata/omsdb/datafiles/oms_data02.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data03.dbf' to '/oradata/omsdb/datafiles/oms_data03.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data04.dbf' to
'/oradata/omsdb/datafiles/oms_data04.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data05.dbf' to
'/oradata/omsdb/datafiles/oms_data05.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data06.dbf' to
'/oradata/omsdb/datafiles/oms_data06.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data07.dbf' to
'/oradata/omsdb/datafiles/oms_data07.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data08.dbf' to
'/oradata/omsdb/datafiles/oms_data08.dbf';

alter database rename file
'/u01/app/oracle/oradata/omsdb/oms_data09.dbf' to
'/oradata/omsdb/datafiles/oms_data09.dbf';

alter database rename file '/u01/app/oracle/oradata/omsdb/oms_data10.dbf'
to '/oradata/omsdb/datafiles/oms_data10.dbf';

4、将表空间online

Alter tablespace oms_data online

四、备份数据库

Rman备份全库

五、将OMS_LOGINFOR表转换成分区表

1、创建OMS_LOGINFOR_1分区表,以REQUESTINCOMETIME字段每天分区

2、将OMS_LOGINFOR表数据写入到OMS_LOGINFOR_1

Insert into OMS_LOGINFOR_1 select * from OMS_LOGINFOR;

3、删除OMS_LOGINFOR表,再将OMS_LOGINFOR_1表重命名为OMS_LOGINFOR

Drop table OMS_LOGINFOR;

Alter table OMS_LOGINFOR_1 rename to OMS_LOGINFOR;

-- Create table

createtable OMS_LOGINFOR

(

autoid             NUMBERnotnull,

requestid          VARCHAR2(200),

customerno         VARCHAR2(64),

systemcode         VARCHAR2(64),

interfacecodeto    VARCHAR2(64),

type               VARCHAR2(20),

content            CLOB,

creator            VARCHAR2(20),

createtime         DATE,

interfacecodefor   VARCHAR2(64),

modular            VARCHAR2(20),

requestincometime  TIMESTAMP(9),

responseouttime    TIMESTAMP(9),

orlrequestdata     CLOB,

conversionrequest  CLOB,

orlresponsedata    CLOB,

conversionresponse CLOB

)

partitionbyrange (REQUESTINCOMETIME)
interval (numtoyMinterval (1,' DAY '))

(

partition
p_2017_03_01 valueslessthan (to_date('2017-03-01', 'yyyy-mm-dd'))

)

tablespace OMS_DATA

pctfree10

initrans1

maxtrans255

storage

(

initial64K

next8K

minextents1

maxextentsunlimited

);

-- Add comments to the table

commentontable OMS_LOGINFOR

is'日志信息表';

-- Add comments to the columns

commentoncolumn OMS_LOGINFOR.autoid

is'序列自增长';

commentoncolumn
OMS_LOGINFOR.requestid

is'一次请求开始到请求结束,ID唯一';

commentoncolumn OMS_LOGINFOR.customerno

is'客户编号';

commentoncolumn
OMS_LOGINFOR.systemcode

is'系统编号';

commentoncolumn
OMS_LOGINFOR.interfacecodeto

is'接口编号';

commentoncolumn OMS_LOGINFOR.type

is'日志类型';

commentoncolumn
OMS_LOGINFOR.content

is'日志内容';

commentoncolumn
OMS_LOGINFOR.creator

is'创建人';

commentoncolumn
OMS_LOGINFOR.createtime

is'日志产生时间';

commentoncolumn
OMS_LOGINFOR.interfacecodefor

is'目标接口编号';

commentoncolumn
OMS_LOGINFOR.modular

is'日志产生的模块';

commentoncolumn OMS_LOGINFOR.requestincometime

is'请求进入时间';

commentoncolumn
OMS_LOGINFOR.responseouttime

is'请求返回时间';

commentoncolumn
OMS_LOGINFOR.orlrequestdata

is'原始请求数据';

commentoncolumn
OMS_LOGINFOR.conversionrequest

is'oms转换后请求数据';

commentoncolumn OMS_LOGINFOR.orlresponsedata

is'原始返回数据';

commentoncolumn
OMS_LOGINFOR.conversionresponse

is'oms转换后返回数据';

-- Create/Recreate indexes

createbitmapindex IDX_OMS_LOG on OMS_LOGINFOR
(INTERFACECODEFOR)

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

createindex IDX_OMS_REQTIME on OMS_LOGINFOR
(REQUESTINCOMETIME)

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

-- Create/Recreate primary, unique and foreign key
constraints

altertable OMS_LOGINFOR

addconstraint PK_AUTOID primarykey (AUTOID)

usingindex

tablespace OMS_DATA

pctfree10

initrans2

maxtrans255

storage

(

initial64K

next1M

minextents1

maxextentsunlimited

);

六、调整REDO日志组文件大小

1、增加日志组:

alter database add logfile group 4 '/oradata/omsdb/onlinelog/redo04.log'
size 1024M;

alter database add logfile group 5 '/oradata/omsdb/onlinelog/redo05.log'
size 1024M;

alter database add logfile group 6 '/oradata/omsdb/onlinelog/redo06.log'
size 1024M;

alter database add logfile group 1 '/oradata/omsdb/onlinelog/redo01.log'
size 1024M;

alter database add logfile group 2 '/oradata/omsdb/onlinelog/redo02.log'
size 1024M;

alter database add logfile group 3 '/oradata/omsdb/onlinelog/redo03.log'
size 1024M;

4、  删除日志组:

切换日志状态:

Alter system switch logfile;

Alter system checkpoint;

删除日志:

Alter database drop logfile group 1;

Alter database drop logfile group 2;

Alter database drop logfile group 3;

5、  删除日志文件

Rm /u01/app/oracle/oradata/omsdb/redo01.log

Rm /u01/app/oracle/oradata/omsdb/redo02.log

Rm /u01/app/oracle/oradata/omsdb/redo03.log

OMS数据库调整1的更多相关文章

  1. oracle数据库调整字段顺序

    oracle数据库调整字段顺序 https://blog.csdn.net/xiaobaixie/article/details/77892034

  2. MYSQL数据库的优化

    我们究竟应该如何对MySQL数据库进行优化?下面我就从MySQL对硬件的选择.MySQL的安装.my.cnf的优化.MySQL如何进行架构设计及数据切分等方面来说明这个问题. 服务器物理硬件的优化 在 ...

  3. SQLServer数据库转换成MySQL数据库

    由于工作需要,系统原先的SQLServer数据库要转换成MYSQL数据库,所以这两天就一直在查阅这方面的资料.最开始,我尝试从SQLServer中导出SQL文件,然后导入到MYSQL数据库中,发现报错 ...

  4. [转]MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验

    本文转自:http://liangweilinux.blog.51cto.com/8340258/1728131 年,嘿,废话不多说,下面开启MySQL优化之旅! 我们究竟应该如何对MySQL数据库进 ...

  5. java程序员从笨鸟到菜鸟之(七)一—java数据库操作

     本文来自:曹胜欢博客专栏.转载请注明出处:http://blog.csdn.net/csh624366188 数据库访问几乎每一个稍微成型的程序都要用到的知识,怎么高效的访问数据库也是我们学习的一个 ...

  6. MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验

    原文地址:http://liangweilinux.blog.51cto.com/8340258/1728131 首先在此感谢下我的老师年一线实战经验,我当然不能和我的老师平起平坐,得到老师三分之一的 ...

  7. 数据库迁移(SQL SERVER导入数据到MySql)

    地址:http://blog.csdn.net/jiaohougenyang/article/details/44937801 背景:项目最开始时使用的是SQL Server数据库,业务需求现要将数据 ...

  8. oschina数据库相关

    数据库相关 110数据库服务器 233NoSQL数据库 18MySQL衍生版 6开源XML数据库 311数据库管理工具 117数据库调整和优化 274数据库驱动程序 41数据库建模

  9. xr报表调整

    xr报表调整,此乃为软件应用层调整,非后端数据库调整. 主单付款方式为AR支票300元 应收账务AR支票预付款 3000元录入调整 -300 AR支票付款录入收入 300 现金付款核销掉,报表现金多出 ...

随机推荐

  1. css3 变换、过渡效果、动画

    1 CSS3 选择器 1.1 基本选择器 1.2 层级 空格 > + .item+li ~ .item~p 1.3 属性选择器 [attr] [attr=value] [attr^=value] ...

  2. jQuery1.6.1源码分析系列(作者:nuysoft/高云)

    作者:nuysoft/高云 QQ:47214707 Email:nuysoft@gmail.com jQuery源码分析(版本1.6.1) 00 前言开光 01 总体架构 02 正则表达式-RegEx ...

  3. 从零开始利用vue-cli搭建简单音乐网站(六)

    上一篇遗漏了一个简单的效果没写,见下图: 主页面点击热门推荐和更多之后跳转到歌曲列表页面,现在的页面只是简单的把所有歌曲列出来,没有进行排序.实现起来也很简单,在MainPage的两个链接上添加: & ...

  4. List 集合中数据不重复的使用

    foreach (DataRow dr in dt.Rows) { list.Add(dr["项目组"].ToString()); } list = list.Distinct&l ...

  5. ARM指令解析

    今天我来总结一下arm指令的学习,今天我不会对所有的arm指令进行一一的解析,在这里希望大家去看arm汇编手册,这个手册的中文版我放在了http://download.csdn.net/detail/ ...

  6. CPU性能的评价

    人们通常用benchmark 来衡量CPU的性能,常见的benchmark有dhrystone和coremark. 由于dhrystone 受编译器影响比较大,所以,结果不是很准确,现在大多采用cor ...

  7. 关于自动化测试环境的集成(Jenkins+RobotFramework+TestLink+SVN)

    本人主要从事网络安全产品的测试,由于一些产品功能在后期稳定后每个版本的迭代仍需要投入大量的时间和精力去测试,所以近期计划逐步的去了解自动化测试的一些内容来节省和解放一些资源.由于自己并没有什么编码基础 ...

  8. Thread and Peocess

    Thread and Peocess pthread_create() 原型: int pthread_create(pthread_t* thread, pthread_attr_t* attr, ...

  9. UVA 1625 Color Length 颜色的长度 (预处理+dp)

    dp[i][j]表示前一个序列拿了i个颜色,后一个序列拿了j个颜色的最小花费. 转移的时候显然只能向dp[i+1][j],或dp[i][j+1]转移,每增加拿走一个颜色,之前已经出现但没结束的颜色个数 ...

  10. layui模块规范

    刚入公司不久,就开始做项目了,最后还是选择用layui来做前端的页面,一来是可以自适应,二来是用框架比较方便,简洁. 先看下Layui的介绍: layui 是一款采用自身模块规范编写的情怀级前端UI框 ...