时间:2021-07-01 10:21:17 帮助过:28人阅读
语法
create database database_name
[ on
{ [ primary ] [
[ ,
[ log on {
]
[ collate collation_name ]
[ with
]
[;]
to attach a database
create database database_name
on
for { attach [ with
| attach_rebuild_log }
[;]
{
(
name = logical_file_name ,
filename = { 'os_file_name' | 'filestream_path' }
[ , size = size [ kb | mb | gb | tb ] ]
[ , maxsize = { max_size [ kb | mb | gb | tb ] | unlimited } ]
[ , filegrowth = growth_increment [ kb | mb | gb | tb | % ] ]
) [ ,...n ]
}
{
filegroup filegroup_name [ contains filestream ] [ default ]
}
{
[ db_chaining { on | off } ]
[ , trustworthy { on | off } ]
}
{
enable_broker
| new_broker
| error_broker_conversations
}
create a database snahot
create database database_snapshot_name
on
(
name = logical_file_name,
filename = 'os_file_name'
) [ ,...n ]
as snapshot of source_database_name
[;]