生成SQL脚本那个简单...就是不知道如何在安装过程中去执行这些脚本...
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'zygl')
DROP DATABASE [zygl]
GO
CREATE DATABASE [zygl] ON (NAME = N'zygl_Data', FILENAME = N'd:\Program Files\Microsoft SQL Server\MSSQL$HIS\data\zygl_Data.MDF' , SIZE = 3, FILEGROWTH = 10%) LOG ON (NAME = N'zygl_Log', FILENAME = N'd:\Program Files\Microsoft SQL Server\MSSQL$HIS\data\zygl_Log.LDF' , SIZE = 4, FILEGROWTH = 10%)
COLLATE Chinese_PRC_CI_AS
GO
exec sp_dboption N'zygl', N'autoclose', N'true'
GO
exec sp_dboption N'zygl', N'bulkcopy', N'false'
GO
exec sp_dboption N'zygl', N'trunc. log', N'true'
GO
exec sp_dboption N'zygl', N'torn page detection', N'true'
GO
exec sp_dboption N'zygl', N'read only', N'false'
GO
exec sp_dboption N'zygl', N'dbo use', N'false'
GO
exec sp_dboption N'zygl', N'single', N'false'
GO
exec sp_dboption N'zygl', N'autoshrink', N'true'
GO
exec sp_dboption N'zygl', N'ANSI null default', N'false'
GO
exec sp_dboption N'zygl', N'recursive triggers', N'false'
GO
exec sp_dboption N'zygl', N'ANSI nulls', N'false'
GO
exec sp_dboption N'zygl', N'concat null yields null', N'false'
GO
exec sp_dboption N'zygl', N'cursor close on commit', N'false'
GO
exec sp_dboption N'zygl', N'default to local cursor', N'false'
GO
exec sp_dboption N'zygl', N'quoted identifier', N'false'
GO
exec sp_dboption N'zygl', N'ANSI warnings', N'false'
GO
exec sp_dboption N'zygl', N'auto create statistics', N'true'
GO
exec sp_dboption N'zygl', N'auto update statistics', N'true'
GO
if( ( (@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion & 0xffff >= 724) ) or ( (@@microsoftversion / power(2, 24) = 7) and (@@microsoftversion & 0xffff >= 1082) ) )
exec sp_dboption N'zygl', N'db chaining', N'false'