How to fix the "Could not read metadata, possibly due to insufficient access rights" error in Sql Server 2008 How to fix the "Could not read metadata, possibly due to insufficient access rights" error in Sql Server 2008

How to fix the “Could not read metadata, possibly due to insufficient access rights” error in Sql Server 2008

The Problem

You are doing the responsible thing and make a backup before you make any crazy changes to your Sql Server 2008 database.  You choose the option that gives you the most flexibility and decide to script your backup.  Who knows where this backup will eventually go?

You go through the Tasks>Script Database, and you get the following error

Microsoft.SqlServer.Management.Smo.SmoException: Could not read metadata, possibly due to insufficient access rights. at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

The Cause

If I had to guess, I would say that the scripting engine is assuming too much in terms of login.  In any case, just try the option below.

The Solution

Instead of having the “Script Entire Database and Database Objects” radio button checked, instead select “Select specific database options” and just check all three options.  That gives you a large text file containing your database scheme and all of the data that your database contains.

 

Written By Steve French

 

5 responses to “How to fix the “Could not read metadata, possibly due to insufficient access rights” error in Sql Server 2008”

Leave a Reply

Your email address will not be published. Required fields are marked *






Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.