locked
What database permissions are required for installing an update package? RRS feed

  • Question

  • Hi all,

    I am installing a LightSwitch update package on the iis server, which includes a sql update script. The process fails during the execution of the database script. It fails on this:

       IF EXISTS (SELECT 1
          FROM [master].[dbo].[sysdatabases]
          WHERE [name]= N'$(DatabaseName)') .....

    I am logged on with integrated secutity, I am a dbowner and this LightSwitch database is my default database. That gives another problem: the script changes the database to Single User mode, which causes me no longer to be able to log on to the server after this script has failed.

    In my development environment it just works, I suppose because I have full permissions on everything there.

    I asked the DBA of the server to allow me to do everything, but he refuses (of course). He wants to know what permisions I really need.

    Can anyone tell me what database permissions I need in order to execute the update scripts?

    Thanks for your help.


    Thanks, Edgar Walther

    Monday, February 24, 2014 8:43 PM

All replies

  • In my experience it only puts your SQL database into the "Single User Mode" when a deployment fails.

    The docs on deployment are actually very good:

    Deployment: Distributing and Maintaining Your Application

    When you are dealing with a DBA, you may want to just create the "deployment package", a .zip file, so that the DBA can run it themselves because in my experience (please take it with a grain of salt) I have 'database owner' permission.


    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com


    Monday, February 24, 2014 9:07 PM
  • Hi Michael, Thanks for your reply.

    I cannot find this information in the documentation.

    The sql script contains the statement that sets the database to single user mode. Just a few lines above where it fails.

    In this case, they want me to run the deployment package. They say I am database owner, but apparently I need to be able to do more. The script line mentioned above performs a select from [master], maybe I am not allowed to do that?

    There may also be other actions further down in the script that require special permisions. That is why I would like to know what permissions are required to run the whole script successfully.


    Thanks, Edgar Walther

    Monday, February 24, 2014 9:49 PM