.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Required Permissions for SQL Server 2005 DB and Impersonation

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :Sql Server
I have an Intranet ASP.NET WebForm application that uses Integrated Windows authenication and Impersonation (required becuase triggers are used to create audit logs) to connect to a SQL Server 2005 DB on the same box (no double hop issues). Normal users get their DB permissions via the <Domain\Domain Users AD group, which has a SQL Server login and a user created for the DB.  Everything works fine when I explictly grant the associated DB user CONTROL permissions on the DB.

However, after doing more research on the actual permissions granted via CONTROL, this seems to be way too much access.  The best decription of the CONTROL permission I found was at http://www.mssqltips.com/tip.asp?tip=1718, which states, "This grants the equivalent to ownership over the database. The db_owner fixed database role has this permission implicitly."  However, every other DB permission combination I've tried without granting CONTROL always fails to connect to the DB.  Impersonation is working, the correct accessing Domain/User is referenced in the error message.  The approriate User in the DB is in the db_datareader and db_datawriter roles and when I explictly grant them every single permission on the DB except CONTROl they fail with a "

View Complete Post

More Related Resource Links

sql server 2005 enterprise edition is required


sql serve 2005 enterprise edition is required to work with microsoft enterprise blocks


SQL Server 2005 Express Edition - GUI to set permissions on stored procedures

Hi there, I have SQL Serve 2005 Express Edition (Build 2600: Service Pack 3) installed; I also have the Management Console installed. My problem is that I cannot set execute permission, or any other type of permissions on my stored procedures through the GUI, as the Property menu item is missing from the right click menu. I read somewhere that this happens when you have SP1, but as I stated above I have got SP3 installed... Any help?   Regards, D.

Setup failed to install the required component Microsoft SQL Server 2005 Express (MSSMLBIZ)


I Don't understand what this means: Everytime I try and install the disc 2 of my Office Small Business 2007, it gives the same message.  Help.


Microsoft SQL Server 2005 9.00.3042.00
OS Version      : Home Edition  (Build 6000)
Time            : Tue Jul 03 17:14:45 2007
Machine         : SWANNER-PC
Product         : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.3042.00
Install         : Failed
Log File        : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0005_SWANNER-PC_SQLSupport_1.log
Error Number    : 1618
Machine         : SWANNER-PC
Product         : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install         : Failed
Log File        : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0005_SWANNER-PC_SQLNCLI_1.log
Error Number    : 1618
Machine         : SWANNER-PC
Product         : Microsoft SQL Server VSS Writer
Product Version : 9.00.3042.00
Install         : Failed
Log File        : c:\Program Files\Microsoft SQL Ser

SQL Server 2005 permissions error. The EXECUTE permission was denied on the object "xp_instance_reg


I have a SQL Server host running SQL 2005 9.00.4294 x86 Standard Edition running on Windows build 2195 SP4.  My client workstation is running only SQL Server 2005 workstaion components.   When a user of the host who has db_owner access attempts to view the properties of a table by right-clicking the table and then clicking Properties, the following error mesage is displayed:  

"The EXECUTE permission was denied on the object "xp_instance_regread", database 'mssqlsystemresource', schema 'sys'

For security purposes, I do not want to grant execute on xp_instance_regread to these users. Does anyone know of a workaround that will allow members of db_owner to access table properties using the abovementioned method and does not require execute access to be granted?




sql server 2005 install on SBS2003 fails due to registry key permissions

I am posting this to hopefully help someone else that encounters the same issue in the future...

Server:  SBS 2003 Premium, with exchange and with all service packs/patches applied.
Server-name: NEWSERVER
Server migrated from: OLDSERVER
Important notes:
This server was migrated from another SBS 2003 on different HW following the instructions provided by microsoft.
The oldserver had exchange and sql 2005 installed on it.
The new server has Office Accounting 2005 installed, but I don't think that matters...

I am trying to install SQL 2005 from the SBS2003-R2 DVD onto the new server, and get the following error:

TITLE: Microsoft SQL Server 2005 Setup

SQL Server Setup failed to modify security permissions on registry key SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer\SuperSocketNetLib for user Administrator. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that the registry key  exists on the destination drive.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&

softwares required / installation steps for using SSRS 2008 along with SQL server 2005 as DataSource



I want to use SSRS 2008 to develop reports, but SQL server 2005 should be used as datasource, so I assume that,

1) MS Visual Studio 2008 and SQL Server 2008 should be installed to get SSRS 2008 and BIDS

2) SQL server 2005 should be installed and in "Reporting Services Configuration Manager" the Database section should point to SQL server 2005

Please suggest whether the approach is correct or not, if not please give me the correct way to achieve it.



Database permissions required for Smo.Server.NetName


Hi all,

who can explain why when i use this code:

  ServerConnection conn = ServerConnection(serverName);

  var server = new Server(conn);
  string testInstance = server.NetName

next exception is thrown:

"Caught exception in SQL Product Configuration wizard. Exception: Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: xp_regread() returned error 5, 'Access is denied.'
xp_regread() returned error 5, 'Access is denied.'
xp_regread() returned error 5, 'Access is denied.'"

user can connect using SQL management studio.

It will only work if i give user "SysAdmin" permission. Obviously it is too high of a permission to read server and db properties

Any help is much appreciated,


what permissions required fro Lnked Server


Hi All,

Need some help regarding Linked Server.

Environment:SQL Server 2005 , sp2



Goal: I want to check the properties of my Linked server.




I have db machine and two instance are running SQL01 and SQL02.

From SQL01, i have a created a Linked server to SQL02 using sysadmin accnt

 /* script */

/****** Object: LinkedServer [machine\SQL02] ******/

EXEC master.dbo.sp_addlinkedserver

@server = N'machine\SQL02',

@srvproduct=N'SQL Server'

/* For security reasons the linked server remote logins password is changed with */

EXEC master.dbo.sp_addlinkedsrvlogin







EXEC master.dbo.sp_serveroption


@optname=N'collation compatible',



EXEC master.dbo.sp_serveroption


@optname=N'data access',



EXEC master.dbo.sp_serveroption





EXEC master.dbo.sp_serveroption



SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

sql server 2000 vs 2005


i would like to ask what the difference between sql server 2000 and 2005 

How to save Unicode in SQL Server 2005

I am using google transliteration to display the text in Hindi/Tamil

I tried to store the text appear as Hindi from textarea in an nvarchar
field of database (SQL Server 2005) , the text saved as "???????".

After retireving text from the same it display the text as "???????".

Can anyone help me how to store and retrieve the actual data from SQL
Server 2005?

I am using ASP.net,VB.Net and SQL Server 2005

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

need help: HTMLEditor, Sql-Server 2005 and CrystalReport


Hi All,
i use the Ajax Control Toolkit HTMLEditor in VS 2008 web-project and save the formated text/content in Sql-Server 2005 - it works fine!

Now, i want print the formated text in a Report, with CrystalReport...??? is this possible?

How do i handle the process? i thing, i see the forest based on all the trees not more...

Can anyone help me? how to do?


Required permissions cannot be acquired when host asp.net 3.5 application in godaddy


I got the following error when click print report button.

Application : asp.net 3.5

Crystal report : 10.5

Host: godaddy

Please help me.


Required permissions cannot be acquired.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

SQL Server 2005: Regular Expressions Make Pattern Matching And Data Extraction Easier


Now you can perform efficient, sophisticated text analysis using regular expressions in SQL Server 2005.

David Banister

MSDN Magazine February 2007

SQL Server 2005: Jazz Up Your Data Using Custom Report Items In SQL Server Reporting Services


Custom report items in SQL Server 2005 Reporting Services address your needs for custom reports without the pain of doing it from scratch.

Teo Lachev

MSDN Magazine October 2006

Use The Source, Luke: Source Server Helps You Kill Bugs Dead In Visual Studio 2005


The latest releases of WinDBG and Visual Studio know exactly how to use source server, so its benefits are available to both .NET and native C++ developers. See why this is so important in tracking down bugs.

John Robbins

MSDN Magazine August 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend