如何使用C#安装SQLEXPRESS 2012 [英] How to install SQLEXPRESS 2012 using C#

查看:51
本文介绍了如何使用C#安装SQLEXPRESS 2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在安装我的应用程序时安装SQL EXPRESS 2012

所以

MSN给出这样的Command文本

Setup.exe/q/ACTION =安装/FEATURES = SQL/INSTANCENAME = MSSQLSERVER/SQLSVCACCOUNT =<域名\用户名>" /SQLSVCPASSWORD =< strongpassword>" /SQLSYSADMINACCOUNTS =<域名\用户名>" /AGTSVCACCOUNT ="NT AUTHORITY \ Network Service"/IACCEPTSQLSERVERLICENSETERMS

我得到了适当的指示,但没有开火..



http://msdn.microsoft.com/en-us/library/ms144259.aspx#SysPrep [^ ]



我们已经完成了SQLEXPRESS2005,所以更改2012 Sqlexpress
因此,请提供所需的参数值,但仍未安装....

i Want to install SQL EXPRESS 2012 while install my application

so

MSN give Command text like this

Setup.exe /q /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="<domainname\username>" /SQLSVCPASSWORD="<strongpassword>" /SQLSYSADMINACCOUNTS="<domainname\username>" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /IACCEPTSQLSERVERLICENSETERMS

i was given properly but it''s not fire..



http://msdn.microsoft.com/en-us/library/ms144259.aspx#SysPrep[^]



We already done SQLEXPRESS2005 so change 2012 Sqlexpress
so giving reqired parameter value but still not installed ....

推荐答案

您不应在安装中包括SQL Server.有两个原因:
0)您只能出于版权原因分发SQL Server Express-不能分发SQL Server完整版.
1)他们可能已经在网络上安装了SQL Server.如果是这样,那么他们大概会想使用该版本.
2)如果他们确实安装了SQL Server,并且您开始激增SQL Server Express实例,那么您将烦恼数据库管理员...
3)与在用户控制下的多个分散版本相比,备份SQl Server的单个站点的可能性要大得多.
4)对于普通"用户来说,安装和管理Sql Server非常复杂-这不是一个好主意!
5)它将破坏使用SqlServer而不是SqlCE或SQLite的主要优势-多用户访问.如果每个人都安装了自己的SQL Server副本,那么您将拥有数据库的多个副本,每个副本都由一个人使用.这将引起一些混乱,并且(取决于您编写原始数据库的方式)在实现问题后可能需要花费相当大的精力才能组合成一个实例.
You should not include SQL Server in your installation. There are a couple of reasons:
0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.


此链接很有帮助

SQL EXPRESS 2012命令行......

http://blogs.msdn.com/b/ai/archive/2012/05/01/installing-sql-aerver-2012-in-unattended-mode-using-command-line.aspx [
This link helpful lot

SQL EXPRESS 2012 Command line ......

http://blogs.msdn.com/b/ai/archive/2012/05/01/installing-sql-aerver-2012-in-unattended-mode-using-command-line.aspx[^]



;SQL SERVER 2012 Configuration File
[OPTIONS]

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.

ACTION="Install"

; Detailed help for command line argument ROLE has not been defined yet.

ROLE="AllFeatures_WithDefaults"

; Detailed help for command line argument ENU has not been defined yet.

ENU="True"

; Setup will not display any user interface.

QUIET="True"

; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and
False or 1 and 0. By default SQL Server Setup will include updates that are found.

UpdateEnabled="True"

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS,
MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality
Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server
Data Tools, and other shared components.
   FEATURES=SQLENGINE,REPLICATION,FULLTEXT,DQ,AS,RS,DQC,BIDS,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,SNAC_SDK,MDS


; Specifies the list of administrator accounts that need to be provisioned.

ASSYSADMINACCOUNTS="<ASSYSADMINACCOUNT>"

; Windows account(s) to provision as SQL Server system administrators.

SQLSYSADMINACCOUNTS="<SYSADMINACCOUNT>"

; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to
enable and 0 or False to disable this feature.

SQMREPORTING="False"

; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to
enable and 0 or False to disable this feature.

ERRORREPORTING="FALSE"

; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and
SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine
(SQL), Analysis Services (AS), or Reporting Services (RS).

INSTANCENAME="MSSQLSERVER"

; RSInputSettings_RSInstallMode_Description

RSINSTALLMODE="FilesOnlyMode"

; Don't provision current user as a Database Engine system administrator.

ADDCURRENTUSERASSQLADMIN="False"


这篇关于如何使用C#安装SQLEXPRESS 2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆