发布网友 发布时间:2022-04-22 08:56
共2个回答
热心网友 时间:2023-07-08 13:28
SQLServer参考脚本下面脚本是用户使用SQLServer数据库时,建立数据库的演示脚本,参考使用,注意调整参数。----------------------------------------------------------------------------------------------------USE
master;goIF
DB_ID
(N'NCDB')
IS
NOT
NULLDROP
DATABASE
[NCDB];goCREATE
DATABASE
[NCDB]goALTER
DATABASE
[NCDB]
ADD
FILEGROUP
[NNC_DATA01]goALTER
DATABASE
[NCDB]
ADD
FILEGROUP
[NNC_INDEX01]goALTER
DATABASE
[NCDB]
ADD
FILE(NAME
=
N'nnc_data01',
FILENAME
=
N'D:\Microsoft
SQL
Server\MSSQL$SQL1\data\nnc_data01_Data.NDF'
,
SIZE
=
800,
FILEGROWTH
=
200)
TO
FILEGROUP
[NNC_DATA01]goALTER
DATABASE
[NCDB]
ADD
FILE(NAME
=
N'nnc_index01',
FILENAME
=
N'D:\Microsoft
SQL
Server\MSSQL$SQL1\data\nnc_index01_Data.NDF'
,
SIZE
=
300,
FILEGROWTH
=
100)
TO
FILEGROUP
[NNC_INDEX01]go--
调整临时表空间declare
@name
char(50)declare
@sql
nvarchar(500)select
@name=rtrim(name)
from
tempdb.dbo.sysfiles
where
status
&
0x40
!=
0x40set
@sql='alter
database
tempdb
modify
file
(
name='+@name+',size=300mb,filegrowth=10mb)'exec
master.dbo.sp_executesql
@sql
热心网友 时间:2023-07-08 13:29
Oracle参考脚本下面脚本是用户使用ORACLE数据库时,建立数据库的演示脚本,参考使用,注意调整参数。----------------------------------------------------------------------------------------------------CREATE
TABLESPACE
NNC_DATA01
DATAFILE
'D:\ORACLE\ORADATA\ORA9I\nnc_data01.dbf'
SIZE
500M
AUTOEXTEND
ON
NEXT
50M
EXTENT
MANAGEMENT
LOCAL
UNIFORM
SIZE
256K
;CREATE
TABLESPACE
NNC_INDEX01
DATAFILE
'D:\ORACLE\ORADATA\ORA9I\nnc_index01.dbf'
SIZE
500M
AUTOEXTEND
ON
NEXT
50M
EXTENT
MANAGEMENT
LOCAL
UNIFORM
SIZE
128K
;CREATE
USER
NC60
IDENTIFIED
BY
NC60
DEFAULT
TABLESPACE
NNC_DATA01
TEMPORARY
TABLESPACE
temp;GRANT
connect,dba
to
NC60;