Question : SQL Server Error 'The select permission...' when trying to generate scripts

I am trying to export a SQL server 2008 database from a share hosting provider using generate script wizard. I have selected to script database data and have set script for server version to SQL server 2005 (required).

I am getting the error message:

TITLE: Microsoft.SqlServer.Smo
------------------------------

An exception occurred while executing a Transact-SQL statement.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Any ideas?

Answer : SQL Server Error 'The select permission...' when trying to generate scripts

Since you are using Dynamic SQL, you will need SELECT permissions on the sql_expression_dependencies table.
Random Solutions  
 
programming4us programming4us