Thanks to all, Finally, I am "merging" all the concepts, and doing this:
<Component Id="SetDBOwner" ...> <sql:SqlString Id="SetDBOwner" Sequence="1" SQL="use TestDatabase exec sp_grantlogin '[COMP_USER_DOMAIN]\[COMP_USER_NAME]' exec sp_grantdbaccess '[COMP_USER_DOMAIN]\[COMP_USER_NAME]' exec sp_addrolemember 'db_owner', '[COMP_USER_DOMAIN]\[COMP_USER_NAME]'" SqlDb="$(var.DBM_COMPONENT_FragmentGroupID)_SQL_DB" ExecuteOnInstall="yes" /> </Component> On Tue, Oct 7, 2008 at 5:37 PM, Amy Rosewater <[EMAIL PROTECTED]>wrote: > Hi Eitan, > > I do something similar in my install with the following under my > SqlDatabase node: > > <sql:SqlString Id="CreateUser" User="SqlUser" ExecuteOnInstall="yes" > SQL="CREATE USER [LOGIN] FOR LOGIN [LOGIN]" Sequence="013" /> > <sql:SqlString Id="AssignUserToRole" User="SqlUser" > ExecuteOnInstall="yes" SQL="sp_addrolemember 'db_owner', '[LOGIN]'" > Sequence="014" /> > > The [LOGIN] is entered in a dialog during the course of my install. > > Amy > > -----Original Message----- > From: Eitan Behar [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 07, 2008 4:35 AM > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] Granting user access to database > > Short question, and waiting for (hopefully) a short answer: > > How to grant grant permissions of db_owner to a certain user on a > database? > > TiA, > > Eitan > ------------------------------------------------------------------------ > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users