Use InstallShield to install and uninstall the SQL Server database (using SQL scripts)

Source: Internet
Author: User

1. Open "SQL scripts View", 1

 
Figure 1. Open the SQL Script View

2

, Create a connection, assuming"Masterconnection", According to the figure2And Graph3Set the connection attributes.


Figure 2 establish a connection

Figure 3 set connection attributes

3In theMasterconnection", CreateScript, Attribute settings4,ScriptThe content is as follows:

1 Use Master
2
3 If   Not   Exists ( Select   *  
4
5 From Master. DBO. sysdatabases
6
7 Where Name =   ' Relaybookkeeping ' )
8
9 Create   Database   ' Relaybookkeeping '
10
11 Go
12

Note:RelaybookkeepingIs the database we need to create.

 
Figure 4CreateScript

4, New Connection"Relaybookkeepingconnection", According to the figure5SetGeneralAttribute.RequirementsAttribute settings3.

 
Figure 5 set connection attributes

5In theRelaybookkeepingconnectionCreate your own database script.6.

 
Figure 6 add your own database script

6, UninstallProgramDelete the database.

Procedure1,2,3. Create a connection,GeneralOn the properties page, set the database nameMaster. Then addScriptFile,RuntimeWhen the property is set to uninstall, the content is:

Use master

drop database relaybookkeeping

go

http://www.cnblogs.com/zhangleixp/archive/2006/11/11/installshielddatabase.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.