我们用使用以下命令来自动建立数据库脚本
在sql的查询分析器里面运行此脚本,自动建立 account,game1,herocommon1.kingfoeiserverdatabase,manage,五个数据库。
Create DataBase Account
On(
Name ='Account_Data',
FileName='DMicrosoft SQL ServerMSSQLDataAccount_Data.Mdf',
Size=1mb
)
Log On (
Name='Account_Log',
FileName='DMicrosoft SQL ServerMSSQLDataAccount_Log.Ldf',
Size=1mb
)
Create DataBase manage
On(
Name ='Manage_Data',
FileName='DMicrosoft SQL ServerMSSQLDataManage_Data.Mdf',
Size=1mb
)
Log On (
Name='Manage_Log',
FileName='DMicrosoft SQL ServerMSSQLDataManage_Log.Ldf',
Size=1mb
)
Create DataBase Game1
On(
Name ='Game1_Data',
FileName='DMicrosoft SQL ServerMSSQLDataGame1_Data.Mdf',
Size=1mb
)
Log On (
Name='Game1_Log',
FileName='DMicrosoft SQL ServerMSSQLDataGame1_Log.Ldf',
Size=1mb
)
Create DataBase Herocommon1
On(
Name ='Herocommon1_Data',
FileName='DMicrosoft SQL ServerMSSQLDataHerocommon1G_Data.Mdf',
Size=1mb
)
Log On (
Name='Herocommon1_Log',
FileName='DMicrosoft SQL ServerMSSQLDataHerocommon1_Log.Ldf',
Size=1mb
)
Create DataBase KingForEiServerBaseData
On(
Name ='KingForEiServerBaseData_Data',
FileName='DMicrosoft SQL ServerMSSQLDataKingForEiServerBaseData_Data.Mdf',
Size=1mb
)
Log On (
Name='KingForEiServerBaseData_Log',
FileName='DMicrosoft SQL ServerMSSQLDataKingForEiServerBaseData_Log.Ldf',
Size=1mb
)
通过以上脚本命令就可以达到自动建立数据的办法
|
|