SQLserver2005Express post-install problem

Hi

I have installed a single instance of SQLserver2005Express on a stand alone PC running WinXP Pro.

Do you always have to be logged in as a Windows [XP] administrator to work with SQL Server databases Because when I'm not it SQLserver Management Studio won't allow me to open any database.

Also, do all databases have to be in the default data folder location [in my case this is: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data] Because if I try and navigate to other databases I have in other locations using Management Studio they are not visible.

Any help gratefully accepted...newtWales.




Answer this question

SQLserver2005Express post-install problem

  • cisco0407

    Hi newtWales,

    I'm moving this thread to the SQL Express forum where you might see some better answers.

    -Jeffrey



  • saint nik

    There are two factors at work here:

    1. In order to attach a database you must have DBCreator privileges on the Server, unless you're using a User Instance. By default, only members in the sysadmin Server Role have this privilege and only the Administrators group on your computer is in the sysadmin Role.
    2. In order to attach to a database file, the SQL Express service account must have read/write access to the folder where the database file is stored. By default SQL Express runs as Network Services, which is a reduced permissions account that doesn't have read/write access to many folders, notably, it doesn't have permissions to folders in user profile hierarchy which includes My Documents.

    SQL Express has a new feature called User Instances to allow non-admin users to be able to use applications that sit on top of SQL Express. The full details of User Instances are spelled out in a white paper on the topic, but the upshot is that we can start a special instance of SQL Express on the fly and specify the currently logged in user as the service account. This gives the user the ability to attach databases even though they are not Administrators and to access files in their own user profile directory. This is the default type of connection used by VS 2005.

    Hope this helps.

    Regards,

    Mike Wachal
    SQL Express team



  • SQLserver2005Express post-install problem