Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Thursday, May 29, 2008

SQL: Could not obtain information about Windows NT group/user

I received the following error when doing a sql install:

CREATE ASSEMBLY [Dan.ImportFile]
AUTHORIZATION clrUser
FROM 'E:\Dan\SQL\ImportFile.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS

Msg 15404, Level 16, State 19, Line 1
Could not obtain information about Windows NT group/user 'DOMAIN\usersql', error code 0x5.


What I am trying to do is give sql access to a .net assembly through a user/login/assymetric key.

Traversing through the web and looking for the cause led me to the following article:
http://support.microsoft.com/kb/834124


Although this was great, it didnt get me to the final solution. The problem actually ended up being pretty simple. My sql server service is running under a domain account. The domain account password was expired so when the lookup tried to access the active directory we received the error message.

SOLUTION: Update the password on the SQL Server service(s)

Confirmation of the problem could be found in the windows security event log where my DOMAIN\usersql account was failing logon.

Friday, February 15, 2008

No anchor member was specified for recursive query Problem

Recently I've been playing around with Common Table Expressions (CTE) and I've had a little difficulty figuring out exactly what the syntax is for it.
The main problem I was having was figuring out how the recursive member integrates with the CTE table. I kept getting the following error.

No anchor member was specified for recursive query "MemberRelation".

After a few hours of troubleshooting I realized that I didnt fully understand what the first line of code for the CTE was doing. In actuality, it is describing the table layout of the result set. (Not a table in the database.) Now the expression is working and making sense:

with MyRelation
(
ID1,
ID2,
Level
)
as
(
-- Anchor member definition
select ID1
,ID2
,0 as Level
from relation as e
UNION ALL
-- Recursive member definition
select e.ID1
,e.ID2
,Level + 1
from relation as e
join MyRelation R on R.ID2 = e.ID1
)
-- Statement that executes the CTE
select top 1 * from MyRelation
where Level = 3
option(Maxrecursion 3)
GO

Saturday, February 2, 2008

GenerateAndPersistNewIndex causing "Not enough storage is available" error

Here is a good “gotcha” for the GenerateAndPersistNewIndex setting in the Fuzzy Lookup component delivered with SSIS and SQL 2005.

Problem: MaxMemoryUsage set to 0 (Unlimited) - When this is set to 0, and the MatchIndexOpetion set to GenerateAndPersistNewIndex, the package will fail stating: "Not enough storage is available to complete this operation"

Fix: Set MaxMemoryUsage to 256

There are a few things really odd things that I've discovered:

· The description of MaxMemoryUsage from MS says it applies to the transformation process, not the index creation process.

· With MaxMemoryUsage set to 0 and plenty of RAM, the package may still fail even though it isnt close to maxing out the RAM.

· Even with MaxMemoryUsage set to 256, it is going past this memory requirement. (although I can see it is using a lot less memory than with a setting of 0)