Script Database as - Create To... , Error

  • I've created a db through visual studio for a project, and when i go into SQL Server Management Studio Express to generate SQL scripts for deployment project i am encountering an error.

    When i try right clicking the database Tasks - Generate Scripts

    Selecting "Script all objects in the selected database"

    .. then under Options - General setting "Script database create" to true... i get a great big FAIL for all the actions.

    If i try it without the Create, it works.

    If i try Script Database As - Create to, i get errors again:

    "Script failed for Database 'DB name'. (Microsoft.SqlServer.Express.Smo)

    Could not read metadata, possibly due to insufficient access rights"

    I'm connecting to the database under Windows Authentication. I'm also running Vista.

    Help anyone?

     

  • Ok found 'a' solution.

    Had to activate the Admin account in Computer Management - Users, as this is set to disabled by default in Vista.

    Uninstalled SQL Server Management Studio Express, then logged out of my user, logged in as Administrator, installed SQL Server Management Studio Express as the Administrator. I could then run the Generate Scripts tool to make the .sql file i needed.

  • Just to reassure you, you found "the" solution. You didn't have sufficient permissions under your regular login. You had to either get your login the permssions needed, or use a login that had them. You did the second thing.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply