Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Could not obtain information about Windows NT grou

Author  Topic 

kamii47
Constraint Violating Yak Guru

353 Posts

Posted - 2011-01-12 : 06:23:08
I have an application where I am trying to use Windows integrated authentication

In one of the stored procedure where i am truncating one of my table
I am getting error
Could not obtain information about Windows NT group/user 'KamranUser', error code 0x5.
My stored procedure is given below


CREATE PROCEDURE [dbo].[usp_EmptyReferecneData]
WITH EXECUTE AS SELF
AS TRUNCATE TABLE ReferecneData;

Fromt he same credentail i am able to broswe other screen do insert update delete easily.
Only problem is in with [WITH EXECUTE AS SELF AS TRUNCATE TABLE ..]

Kamran Shahid
Sr. Software Engineer
(MCSD.Net,MCPD.net)

Sachin.Nand

2937 Posts

Posted - 2011-01-12 : 06:30:46
try this

CREATE PROCEDURE [dbo].[usp_EmptyReferecneData]
WITH EXECUTE AS 'YourUserName'
AS TRUNCATE TABLE ReferecneData;


PBUH

Go to Top of Page

kamii47
Constraint Violating Yak Guru

353 Posts

Posted - 2011-01-12 : 06:34:05
What should be at 'YourUserName' should it be the user name of the machine? I don't think so that it could be possible to give me such a script where Machine user name should be hardcoded.Could there be any other work around?


Kamran Shahid
Sr. Software Engineer
(MCSD.Net,MCPD.net)

Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-01-12 : 06:37:56
I just need to know whether the above script works.It is the username with the one you are the user for the database where the table is present with i.e kamranuser.Also have you checked whether you have TRUNCATE permission for the table.Also what do you mean by other screen

quote:
Fromt he same credentail i am able to broswe other screen do insert update delete easily.



PBUH

Go to Top of Page

kamii47
Constraint Violating Yak Guru

353 Posts

Posted - 2011-01-12 : 06:42:47
I mean same web application where this truncate storep procedure is calling have some other web pages.Where there is no problem encountered

Kamran Shahid
Sr. Software Engineer
(MCSD.Net,MCPD.net)

Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-01-12 : 06:42:59
Well just found this article

http://support.microsoft.com/kb/834124/en-us

PBUH

Go to Top of Page
   

- Advertisement -