Oh and if SQL is clustered or has a named instance don't use "."

J

On Wed, Jan 7, 2015 at 2:23 AM, patrickpirzer <patrick.pir...@prosoft.net>
wrote:

> I have programmed a bootstrapper-project with WiX 3.8.
> While the installation i want to create a sql server login with
> sql-authentication.
> So i embedded in the Product.wxs of my MSI-Project the following component.
>
>         <Component Id="CreateSqlLogin"
>                    Guid="EB24CC36-D016-4E7C-A35D-26D31E1A5DFA"
>                    Directory="TARGETDIR">
>             <sql:SqlDatabase Id="SqlDatabase"
>                              Database="testDb"
>                              Server="."
>                              Instance="SQLEXPRESS"
>                              CreateOnInstall="yes"
>                              DropOnUninstall="yes"
>                              DropOnReinstall="no"
>                              ContinueOnError="yes">
>                 <sql:SqlString Id="CreateLogin"
>                                ContinueOnError="yes"
>                                ExecuteOnInstall="yes"
>                                ExecuteOnUninstall="no"
>                                ExecuteOnReinstall="no"
>                                Sequence="11000"
>                                SQL="BEGIN
>                                       USE [master]
>                                       GO
>                                       CREATE LOGIN [MyUser] WITH
> PASSWORD=N'YourPassword', DEFAULT_DATABASE=[master],
> DEFAULT_LANGUAGE=[Deutsch], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
>                                       GO
>                                       ALTER LOGIN [MyUser] DISABLE
>                                       GO
>                                     END"></sql:SqlString>
>             </sql:SqlDatabase>
>         </Component>
>
> But when i take a look into the logins with SQL Server Management, the
> MyUser-login is not there.
> Further i have the problem, that i don't want to create always the database
> before creating the login.
> Is there a way to do that?
>
> Thanks in advance!
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-create-a-sql-server-login-without-creating-a-database-tp7598746.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>



-- 
"They may forget what you said but they will never forget how you made them
feel." -- Anonymous
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to