Access Is Denied Microsoft Sql Server Error 22001
Contents |
here for a quick overview of the site Help Center Detailed xp_regread permissions answers to any questions you might have Meta Discuss how-to-configure-permissions-for-xp_regread-and-xp_instance_regread the workings and policies of this site About Us Learn more about Stack Overflow the
Sql Server Xp_regread
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up xp_regread() returned error 5, 'Access is denied.' up vote 2 down vote favorite I'm running the SQL Server Copy Database Wizard. Of note is that the Operator is NT AUTHORITY\SYSTEM, which I thought should have the authority to run whatever it wants. How can we grant sufficient privileges to NT AUTHORITY\SYSTEM? I have already tried: GRANT EXECUTE ON xp_regread TO public GRANT EXECUTE ON xp_regread TO [NT AUTHORITY\SYSTEM] And running the following shows that it worked. SELECT grantee_principal.name AS [Grantee] , prmssn.permission_name FROM sys.all_objects AS xproc INNER JOIN sys.database_permissions AS prmssn ON prmssn.major_id=xproc.object_id AND prmssn.minor_id=0 AND prmssn.class=1 INNER JOIN sys.database_principals AS grantee_principal ON grantee_principal.principal_id = prmssn.grantee_principal_id WHERE (xproc.type='X')and(xproc.name=N'xp_regread' and SCHEMA_NAME(xproc.schema_id)=N'sys') Output: Grantee permission_name public EXECUTE NT AUTHORITY\SYSTEM EXECUTE The following error occurs: Event Name: OnError Message: An exception occurred while executing a Transact-SQL statement or batch. StackTrace: at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand, SqlCommand& command) at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataReader(String query, SqlCommand& command) at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query) at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm) at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, Stri
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2005 » SQL Server 2005 General Discussion » XP_Regread Error 5 in SQL 2005 XP_Regread Error 5 in SQL 2005 Rate Topic Display Mode Topic Options Author Message Jason H-286943Jason H-286943 Posted Wednesday, December 6, 2006 9:50 AM Valued Member Group: General Forum Members Last Login: Wednesday, January 27, 2016 10:29 AM Points: 55, Visits: 260 Hi,I am trying to http://stackoverflow.com/questions/29712281/xp-regread-returned-error-5-access-is-denied execute a few stored procedures that read keys from the registry. However, when I run them in SQL 2005 they are giving me the following error:Msg 22001, Level 16, State 1, Line 0xp_regread() returned error 5, 'Access is denied.'I've had these working on SQL 2000. I've checked permissions to the Extendable Stored Procedures and the user I am accessing them as http://www.sqlservercentral.com/Forums/Topic328404-149-1.aspx has access to execute.Any suggestion on the what the issue could be?Thanks,J. Post #328404 Bill ScottBill Scott Posted Thursday, December 7, 2006 8:36 AM SSC-Enthusiastic Group: General Forum Members Last Login: Friday, January 24, 2014 8:40 PM Points: 174, Visits: 454 its possible that you don't have permissions to read the registry key itself. I'm not sure how to set permissioins up, but there are permissions in the registry similar to the permissions to the file system. your sql agent account would have to have permissions to read the key(s) you are after. Post #328796 Jason H-286943Jason H-286943 Posted Thursday, December 7, 2006 12:45 PM Valued Member Group: General Forum Members Last Login: Wednesday, January 27, 2016 10:29 AM Points: 55, Visits: 260 I've found the following article on Microsoft's web site, but it is only for SQL 2000 and not SQL 2005: http://support.microsoft.com/kb/887165However, I couldn't find the path:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\ExtendedProcedures---------I verified that the Accounts used for the SQL/SQLSA accounts is in fact aadmin account. I also was able to verify that the administrator account has full access to the registry. Post #328887 Matt JamesM
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Access denied to create new database SQL 2008 on Windows 2008 R2 SQL Server > https://social.msdn.microsoft.com/Forums/sqlserver/en-US/dce9d3ae-11b5-4795-bc69-2a9b804a21fb/access-denied-to-create-new-database-sql-2008-on-windows-2008-r2?forum=sqlexpress SQL Server Express Question 0 Sign in to vote When I attempt to: (1) create a new database in (newly installed) SQL 2008 using Management Studio 2008 on Windows 2008 R2, or (2) change http://sap.ittoolbox.com/groups/technical-functional/sap-basis/xp_regread-returned-error-5-2581964 authentication to SQL and Windows, or (3) change password on "sa" account, or (4) create a new login, or (5) login in as local administrator or domain administrator, I receive the error message sql server of 'access denied' for scenarios 1-4.Would uninstalling SQL 2008, initially installed as local administrator, and then reinstalling the same SQL 2008 as domain administrator cure this permissions issue?Ronrongolini Friday, November 13, 2009 2:53 PM Reply | Quote Answers 0 Sign in to vote After once again getting access to the troubled machine, I noticed that in Management Studio, under Object Explorer Pane|Security|Logins, that the only account listed access is denied was "sa." Without any "Builtin\Administrators" or "Builtin\Users" accounts, this allows only extremely limited read-only access to "sa" to an existing database. Found it difficult to understand how the user could possibly install SQL 2008 in such a manner. Completely overlooked this. After uninstalling SQL Server 2008 on the Windows 2008 R2 machine, rebooting as prompted, and then reinstalling SQL 2008 with the usual and necessary accounts, we were then able to create a database.Thank you to all who offered help.Ronrongolini Marked as answer by rongolini Tuesday, December 01, 2009 4:21 PM Tuesday, December 01, 2009 4:21 PM Reply | Quote All replies 0 Sign in to vote Ron, make sure account under which SQL server Service is running has access to the disk on which you are trying to create database. Proposed as answer by Xiao-Min Tan – MSFTModerator Monday, November 16, 2009 8:44 AM Friday, November 13, 2009 3:22 PM Reply | Quote 0 Sign in to vote Chirag_Shah, the SQL Server Service is running under the Local System account and has access to the disk, which happens to be C:\.Thanks.Ronrongolini Monday, November 16, 2009 2:51 PM Reply | Quote 0 Sign in to vote Ron, Can you elaborate your error
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security Siebel Storage UNIX Visual Basic Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant MarkDeVries DACREE Inside-ERP MacProTX VoIP_News Inside-CRM I_am_the_dragon PCMag maxwellarnold Michael Meyers-Jouan TerryCurran Chris_Day Andrew.S.Baker Richard JoeTorre bracke Ramnath.Awate DukeGanote Locutus Nikki Klein Dennis Stevenson AbhaiTripathi Craig Borysowich Clinton Jones bluesguyAZ59 iudithm mircea_luca Adrian_Grigoriu blrvenkat COMPANIES ZOHO Corporation Imation RSA Conference Apperian View All Topics View All Members View All Companies Toolbox for IT Topics SAP Groups Ask a New Question SAP Basis The SAP Basis group is for the discussion of specific configuration and development issues that arise when utilizing the SAP Basis & System Administration. Home | Invite Peers | More SAP Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. xp regread() returned error 5 Navin_Jaget asked Feb 9, 2009 | Replies (14) Hi, I am getting a number of database error regularly with message : Database errors 22001 at FET > xp_regread() returned error 5, 'Access is denied.' please give me the solution for this error and also the cause of this error. Thanks Navin Join this group Popular White Paper On This Topic Business Intelligence with SharePoint 2010 14Replies Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't be changed) Yes | No Saving... David Caddick replied Feb 9, 2009 Hi, Before we can answer this please supply the following information: OS Version and patch level DB Version and patch level SAP Version Are you seeing this in the System log with Tx SM21, and have you checked out the relevant developer trace file? Are you getting any ABAP short dumps (Tx ST22)? Regards Top Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't be changed) Yes | No Saving... Navin_Jaget replied Feb 9, 2009 Hi Caddik, Plea