数据库表空间设置

mpstat -P ALL 1

;

conn system/root@sysdb;

CREATE TABLESPACE TBS_DATA_PUBLIC DATAFILE '/opt/oracle/oradata/tbs_data_public/vg03_tbs_data_public_2000m_01' SIZE 2000M AUTOEXTEND OFF LOGGING EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K SEGMENT SPACE MANAGEMENT AUTO DEFAULT NOCOMPRESS;

ALTER TABLESPACE TBS_DATA_PUBLIC ADD DATAFILE '/opt/oracle/oradata/tbs_data_public/vg03_tbs_data_public_2000m_02' SIZE 2000M AUTOEXTEND OFF;

ALTER TABLESPACE TBS_DATA_PUBLIC ADD DATAFILE '/opt/oracle/oradata/tbs_data_public/vg03_tbs_data_public_2000m_03' SIZE 2000M AUTOEXTEND OFF;

ALTER TABLESPACE TBS_DATA_PUBLIC ADD DATAFILE '/opt/oracle/oradata/tbs_data_public/vg03_tbs_data_public_2000m_04' SIZE 2000M AUTOEXTEND OFF;

ALTER TABLESPACE TBS_DATA_PUBLIC ADD DATAFILE '/opt/oracle/oradata/tbs_data_public/vg03_tbs_data_public_2000m_05' SIZE 2000M AUTOEXTEND OFF;

ALTER DATABASE DEFAULT TABLESPACE TBS_DATA_PUBLIC;

CREATE TABLESPACE TBS_INDEX_PUBLIC DATAFILE '/opt/oracle/oradata/tbs_index_public/vg03_tbs_index_public_2000m_01' SIZE 2000M AUTOEXTEND OFF LOGGING EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K SEGMENT SPACE MANAGEMENT AUTO DEFAULT NOCOMPRESS;

CREATE TEMPORARY TABLESPACE TBS_TEMP TEMPFILE '/opt/oracle/oradata/tbs_temp/vg03_tbs_temp_2000m_01' SIZE 2000M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TBS_TEMP;

CREATE SMALLFILE UNDO TABLESPACE TBS_UNDO DATAFILE '/opt/oracle/oradata/tbs_undo/vg03_tbs_undo_2000m_01' SIZE 2000M AUTOEXTEND OFF RETENTION NOGUARANTEE;

alter system set undo_tablespace=tbs_undo scope=spfile;

ALTER DATABASE DATAFILE '/opt/oracle/oradata/sysdb/vg01_sysaux_2000m_01' RESIZE 2000M;

--ALTER DATABASE DATAFILE '/opt/oracle/oradata/sysdb/sysaux01.dbf' AUTOEXTEND ON NEXT 100M;

ALTER DATABASE DATAFILE '/opt/oracle/oradata/sysdb/vg01_system_2000m_01' RESIZE 2000M;

--ALTER DATABASE DATAFILE '/opt/oracle/oradata/sysdb/system01.dbf' AUTOEXTEND ON NEXT 100M;

create user SIG_MPD identified by hahaha default tablespace tbs_data_public temporary tablespace tbs_temp account unlock;

grant resource,connect,dba,create table to SIG_MPD;


function  replaceToMaxLength(maxlimit, lableText) {
var text = '';
var regChinese = /[\u4e00-\u9fa5]/;
var regUpCharacter = /[A-Z]/;
var regLowCharacter = /[a-z]/;
var regUnderLine = /[_]/;
var regModdleLine = /[-]/;
var regNumber = /[0-9]/;
var oneLinePix = 0;
var inText = lableText.toString();
var rowWidth = maxlimit;
for (var i = 0; i < inText.length; i++) {
var current = inText.charAt(i);
if (current == ' ') {
text += ' ';
oneLinePix += 1;
} else if (regChinese.test(current)) {
text += current;
oneLinePix += 2;
} else if (regUpCharacter.test(current)) {
text += current;
oneLinePix += 2;
} else if (regLowCharacter.test(current)) {
text += current;
if(current == 'b' || current == 'd' || current == 'e' ||
   current == 'g' || current == 'h' || current == 'm' ||
   current == 'n' || current == 'o' || current == 'p' ||
   current == 'q' || current == 'u' || current == 'w')
{
oneLinePix += 2;
}else{
oneLinePix += 1;
}
} else if (regUnderLine.test(current)) {
text += current;
oneLinePix += 1;
} else if (regModdleLine.test(current)) {
text += current;
oneLinePix += 1;
} else if (regNumber.test(current)) {
text += current;
oneLinePix += 2;
} else {
text += current;
oneLinePix += 1;
}
if (oneLinePix >= rowWidth) {
text = text + "...";
break;
}
}
return text.toString();
}

你可能感兴趣的:(oracle)