如何在SQL SERVER 2008 R2中使用SA和密码创建新的命名实例 [英] How should I create a new named instance with SA and Password in SQL SERVER 2008 R2

查看:109
本文介绍了如何在SQL SERVER 2008 R2中使用SA和密码创建新的命名实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我是MCA的学生,我用 VB.Net 2010 创建了一个名为'在线考试'的项目 &安培; SQL SERVER 2008 R2 使用名为 OnlineExam 的实例与SA&密码=abc @ 123。

问题是,当我创建安装/部署应用程序时,我安装了SQLSERVER2008 / SQLSERVER20082,但它无法安装它的命名实例和SA&密码,即使我已经尝试使用配置文件和命令行(使用cmd)。

我想安装SQLSERVER2008R2而无需用户与命名实例的交互和sa&密码。

请帮我解决这个问题....

谢谢..

Hi there,
I am a student of MCA, I have created a project named 'Online Exam' with VB.Net 2010 & SQL SERVER 2008 R2 using an instance named OnlineExam with SA & Password="abc@123".
the problem is that, while I creating setup/deploy the app I installs SQLSERVER2008/SQLSERVER20082 but it could not install with it's Named Instance and SA & Password, even I have tried it as using Configuration file and command line(using cmd) also.
I want to install SQLSERVER2008R2 without users's interaction with named instance and sa & password.
please help me out of this....
thank you..

推荐答案

你创建了新的SQL服务器实例,它是用混合身份验证创建的吗?



如果你的新实例只接受windows身份验证,你需要重新启用'sa '帐号...



When you created your new instance of SQL server, was it created with mixed authentication?

If your new instance only accepts only windows authentication you need to re-enable the 'sa' account...

ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = 'enterStrongPasswordHere';
GO





当然这对你的问题没有帮助因为你需要无人值守地安装SQL服务器...要做到这一点,你需要一个如下所示的配置文件......正如你所看到的,你可以为安装指定各种配置细节。





Of course this does not help your problem as you need to do an unattended install of SQL server... To do this you will need a configuration file like the one below... As you can see, you can specify various configuration details for the installation.

;SQLSERVER2008 Configuration File
[SQLSERVER2008]
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will reflect the instance ID of the SQL Server instance.
INSTANCEID="MSSQLSERVER"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components.
FEATURES=SQLENGINE,REPLICATION,FULLTEXT,CONN,IS,BC,SDK,SSMS,ADV_SSMS,OCS
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="False"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Detailed help for command line argument ENU has not been defined yet.
ENU="True"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI, and AutoAdvance for a implied UI.
UIMODE="Normal"
; 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 the root installation directory for native shared components.
INSTALLSHAREDDIR="D:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components.
INSTALLSHAREDWOWDIR="D:\Program Files (x86)\Microsoft SQL Server"
; Specify the installation directory.
INSTANCEDIR="D:\Program Files\Microsoft SQL Server"
; 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 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"
; Agent account name
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Automatic"
; Startup type for Integration Services.
ISSVCSTARTUPTYPE="Automatic"
; Account for Integration Services: Domain\User or system account.
ISSVCACCOUNT="NT AUTHORITY\NetworkService"
; Controls the service startup type setting after the service has been created.
ASSVCSTARTUPTYPE="Automatic"
; The collation to be used by Analysis Services.
ASCOLLATION="Latin1_General_CI_AS"
; The location for the Analysis Services data files.
ASDATADIR="Data"
; The location for the Analysis Services log files.
ASLOGDIR="Log"
; The location for the Analysis Services backup files.
ASBACKUPDIR="Backup"
; The location for the Analysis Services temporary files.
ASTEMPDIR="Temp"
; The location for the Analysis Services configuration files.
ASCONFIGDIR="Config"
; Specifies whether or not the MSOLAP provider is allowed to run in process.
ASPROVIDERMSOLAP="1"
; A port number used to connect to the SharePoint Central Administration web application.
FARMADMINPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="False"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="SQLDBPool\Jugal"
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
SECURITYMODE="SQL"
; The Database Engine root data directory.
INSTALLSQLDATADIR="F:\"
; Default directory for the Database Engine user databases.
SQLUSERDBDIR="F:\"
; Default directory for the Database Engine user database logs.
SQLUSERDBLOGDIR="F:\"
; Directory for Database Engine TempDB files.
SQLTEMPDBDIR="G:\"
; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 Express.
ADDCURRENTUSERASSQLADMIN="False"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="0"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Disabled"
; Specifies how the startup mode of the report server NT service.  When
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled
RSSVCSTARTUPTYPE="Automatic"
; Specifies which mode report server is installed in.
; Default value: "FilesOnly"
RSINSTALLMODE="FilesOnlyMode"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"





Then, you can use your file in the following ways.





Then, you can use your file in the following ways.

Setup.exe /ConfigurationFile=ConfigurationFile.INI





You can override any of the values in the configuration file or add more values which are not specified in the configuration file by providing additional command line parameters to setup.exe as shown below.





You can override any of the values in the configuration file or add more values which are not specified in the configuration file by providing additional command line parameters to setup.exe as shown below.

Setup.exe /SQLSVCPASSWORD="password" /ASSVCPASSWORD="password" /AGTSVCPASSWORD="password"
  /ISSVCPASSWORD="password" /RSSVCPASSWORD="password" /SAPWD="password"
/ConfigurationFile=ConfigurationFile.INI


Sorry for late reply, and the code works properly...thanks yo all Sir...
Sorry for late reply, and the code works properly...thanks yo all Sir...


这篇关于如何在SQL SERVER 2008 R2中使用SA和密码创建新的命名实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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