文件名称:
NC6.5 数据库参考脚本及临时表空间配置.pdf
开发工具:
文件大小: 179kb
下载次数: 0
上传时间: 2019-06-30
详细说明:NC6.5 数据库参考脚本及临时表空间配置,SQLServer参考脚本 Oracle参考脚本 DB2参考脚本用友网络科技股份有限公司
YONYOU NO6.5数据库参考脚本及临时表空间配置
1 SQLServer参考脚本
用户创建 SQLServer数据库的脚本如下。可以根据需求,修改参数大小。情创建所需目录。
USE master,
g
I F DB ID(N'ncdb)IS NOT NULL
DROP DATABASE ncdb:
go
create DATABASE ncdb
ON PRIMARY
NAME =N'ncdb', FILENAME=N'D: \sqlserver\ncdb. mdf, SIZE 1000, FILEGROWTH= 200, MAXSIZE 10000
LOG ON
NAME N'NNC LOGo1 FILENAME ND: sqlserver\nnc logo1. ldf, SIZE 10000, FILEGROWTH
100 MAXSIZE=50000)
go
ALTER DATABASE ncdb ADd FIleGrOUP NNC DATA01
g
ALTER DATABASE ncdb ADD FILEGROUP [NNC INDEXO11
ALTER DATABASE ncdb ADD FILE(NAME = N'nnc data01 FILENAME=ND: \sqlserver \nnc data01 Data. NDF
SIZE= 20000, FILEGROWTH= 200, MAXSIZE= UNLIMITED) TO FILEGROUP [NNC DATA01]
go
ALTER DATABASE ncdb ADD FILE(NAME =N'nnc indexo1 FILENAME= ND: \sqlservernnc indexo1 Data NDF
SIZE 10000, FILEGROWTH =200, MAXSIZE =UNLIMITED)TO FILEGROUP [NNC_ INDEX011
ALTER DATABASE [ncdb] MODIFY FILEGROUP [NNC DATAO1] DEFAULT
use ncd b:
sp configure 'show advanced options, 1
Go
RECONFIGURE WITH OVERRIDE
GO
sp configure 'max degree of parallelism 1;
GO
RECONFIGURE WITH OVERRIDE
GO
USE master
3
用友网络科技股份有限公司
YONYOU NO6.5数据库参考脚本及临时表空间配置
ALTER DATABASE ncdb SET READ COMMITTED SNAPSHOT ON
GO
重点注意:默认建库后事务日志为fu模式,及时进行全库备份及事务日志备份,避免事务日志达到上限
50GB影响使用
SIMPLE模式下可以循环使用相当于 oracle的非归档模式数据不够安全,事务日志、数据文件大小可添加多
个文件,大小可根据实际情况调整
NC应用数据库是 SQL Server数据库时,NC使用 tempdb数据库作临时表数据库,不需要另建。对」 tempdb
数据厍,用户可以根据实际应用存储位置;对其大小要求,预调整到1000M,文件增长设置为自动增长,
文件增长不受限制;用户规模更多时,建议调整更大些。下面是通过脚本调整临时表空闫大小的例子。
∥/调整 tempdb的初始大小避免重启恢复初始大小
SQLServer临时表空间要求
declare name char( 50)
declare sql nvarchar(500)
select name=rtrim name) from tempdb dbo. sysfiles where status & 0x40! =0x40
set sql=alter database tempdb modify file
name='+name+, size=10000mb, filegrowth=100mb, MAXSIZE=UNLIMITED
exec master dbo. sp_ executesql sql
注: tempdb可根据实际情况调整大小)
用友网络科技股份有限公司
YONYOU NO6.5数据库参考脚本及临时表空间配置
20rac1e参考脚本
用户创建 ORACLE数据库最高权限的脚本如下。可以根据需求,修改参数大小。酌情创建所需目录。
CREATE TABLESPACE NNC DATA01 DATAFILE'D: ORACLE\ORADATAORA11G\nnc data01. dbf'SIZE 500M
AUTOEXTEND ON NEXT 5OM EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
CREATE TABLESPACE NNC INDEX01 DATAFILE 'D: ORACLE ORADATA\ORA11Gnnc indexo1dbf'SIZE 500M
AUTOEXTEND ON NEXT SOM EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
CREATE USER NC65 IDENTIFIED BY NC65 DEFAULT TABLESPACE NNC DATA01 TEMPORARY TABLESPACE temp
gRanT connect, dba to nc65
用户创建 ORACLE数据库最低权限的脚木如卜。
CREATE TABLESPACE NNC DATAO1 DATAFILE 'D: ORACLE ORADATA ORAl1G\nnc data01.dbf SIZE 500M
AUTOEXTEND ON NEXT 5OM EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
CREATE TABLESPACE NNC INDEX01 DATAFILE 'D: oRACLE ORADATA\ORA11g\nnc indexo1 dbf SIZE 500M
AUTOEXTEND ON NEXT 5OM EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
GRANT CREATE SESSION TO nc65:
GRANT CREATE TABLE TO nc65
GRANT CREATE VIEW TO nc65
GRANT UNLIMITED TABLESPACE TO nc65
GRANT RESOURCE TO nc65
GRANT CONNECT TO nc65
GRANT ALTER SESSION TO nc65:
GRANT CREATE PROCEDURE TO nc65
GRANT CREATE SEQUENCE TO nc65
GRANT CREATE TRIGGER TO nc65
GRANT CREATE SYNONYM TO nc65
ORACLE临时表空间要求
ALTER DATABASE TEMPFILE /ufsoft/rdata/oradata/ora92/temp01.dbf AUTOEXTEND ON NEXT 256M
MAXSIZE 10240M
用友网络科技股份有限公司
YONYOU NO6.5数据库参考脚本及临时表空间配置
3DB2参考脚本
用户创建DB2数据库脚本如下。可以根据需求,修改参数大小。酌情创建所需目录。
d b2 CREATE DATABASE nC65 USING CODESET GBK TERRITORY CN COLLATE USING SYSTEM CATALOG TABLESPACE
MANAGED BY DATABASE USING( FILE 'E: DB2\nc65\ Catalogdata1'128000)USER TABLESPACE MANAGED BY
DATABASE USING( FILE'E: \DB2\nc65\Userdata1'512000 )TEMPORARY TABLESPACE MANAGED BY DATABASE
USING( FILE E \DB2 \nc65 Tempspace1768000)
db2 connect to nc65 user db2inst1 using db2inst1
db2 CREATE Bufferpool NcUSeD4 SIZE 102400 PAGESIZE 4K
db2 CREATE Bufferpool NCUSED16 SIZE 38400 PAGESIZE 16K
db2 CreatE Bufferpool NCTMPUSED16SIZE 38400 PAGESIZE 16K
db2 CREATE regular TABlESPACE NNC_ DATA01 PAGESIZE 16K MANAGED BY DATABASE USING( FILE
E: DB2\nc65\nnc data011024000)EXTENTSIZE 8 OVERHEAD 24.1 PREFETCHSIZE 8 TRANSFERRATE 0.9
BUFFERPOOL NCUSED16
db2 CREATE regular TABleSPACE NNC_INDEX01 PAGESIZE 4K MANAGED BY DATABASE USING( FILl
E:DB2\nc65nnc index01'1024000 )EXTENTSIZE 32 OVERHEAD 24.1 PREFETCHSIZE 32 TRANSFERRATE 0.9
BUFFERPOOL NCUSED4
d b2 CREATE USER TEMPORARY TABLESPACE USERTEMP PAGESIZE 16K MANAGED BY SYSTEM USING
E:DB2\nc65 Usertemp1')EXTENTSIZE 32 OVERHEAD 10.67 PREFETCHSIZE 32 TRANSFERRATE 0.04
BUFFERPOOL NCTMPUSED 16
db2 CREATE SYSTEM TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 16K MANAGED BY SYSTEM USING
(E: \DB2\nc65\ Tempspace2')EXTENTSIZE 32 OVERHEAD 10.67 PREFETCHSIZE 32 TRANSFERRATE 0.04
BUFFERPOOL NCTMPUSED16
GRANT
DBADM, CREATETAB, BINDADD, CONNECT CREATE NOT FENCED ROUTINE, IMPLICIT SCHEMA, LOAD, CREATE EXTE
RNAL ROUTINE, QUIESCE CONNECT, SECADM ON DATABASE TO USER db 2inst1
GRANT
DBADM CREATETAB. BINDADD CONNECT CREATE NOT FENCED ROUTINE IMPLICIT SCHEMA LOAD. CREATE EXTE
RNAL ROUTINE, QUIESCE CONNECT SECADM ON DATABASe TO USeR db2inst1
GRANT USE OF TABLESPACE NNC DATAO1 TO useR db2inst1 WITH GRANT OPTION
GRANT USE OF TABLESPACE NNC INDEXO1 TO useR db2inst1 WITH GRANT OPTION
GRANT USE OF TABLESPACE USERTEMP TO USER db2inst1 WITH GRANT OPTION
CONNECT RESET
update dbm cfg using aslheapsz 768
update dbm cfg using sheapthres 40000
update dbm cfg using maxagents 300
update dbm cfg using NUM POOLAGENTS 100
update database configuration for nc65 using DBHEAP 10240 automatic
update database configuration for nc65 using logbufsz 1024
update database configuration for nc65 using CATALOGCACHE SZ 3072
update database configuration for nc65 using locklist 10240 automatic
update database configuration for nc65 using appl memory automatic
update database configuration for nc65 using sortheap 4096 automatic
用友网络科技股份有限公司
YONYOU NO6.5数据库参考脚本及临时表空间配置
update database configuration for nc65 using stmtheap 3072 automatic
update database configuration for nc65 using applheapsz 1024 automatic
update database configuration for nc65 using pckcachesz 10240 automatic
update database configuration for nc65 using NUM_lOCLEANERs 1 automatic
update database configuration for nc65 using NUM IOSERVERS 1 automatic
update database configuration for nc65 using maxlocks 80
update database configuration for nc65 using MAXAPPLS 300
update database contiguration for nc65 using AVG_ APPLs 200
update database configuration for nc65 using logfilsiz 51200
update database configuration for nc65 using logprimary 30
update database configuration for nc65 using logsecond 200
update database configuration for nc65 using MINCOMMIT 1
d b2 CONNECT RESET
创建并修改完参数后需要重启数据库
db2stop force
d b2start
需要特别注意,本版支持的是DB2V10版本,在建库时,务必检查以下参数设置是否正确
E:\ Program Files\IBM\SQLLIB BIN>db2set
DB2 DEFERRED PREPARE SEMANTICS=YES
DB2 RESTRICT DDE=TRUE
DB2 COMPATIBILITY VECTOREORA
DB2INSTOWNEREWIN-EEHVHL15HPB
DB2PORTRANGE=60000: 60003
DB2INSTPROF=C: \PROGRAMDATA IBM\DB2\DB2COPY1
DB2 COMM=TCPIP
DB2临时表空间要求
d b2 CREATE USER TEMPORARY TABLESPACE USERTEMP PAGESIZE 16K MANAGED BY SYSTEM USING
(E:\DB2nc65\Usertemp1')EXTENTSIZE 32 OVERHEAD 10.67 PREFETCHSIZE 32 TRANSFERRATE 0.04
BUFFERPOOL NCTMPUSED16
db2 GRANT USE OF TABLESPACE USERTEMP TO useR db2inst1 WITH GRANT OPTION
7
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.