Key Lock Hashed Resource Text Value Not Unique?

Jul 23, 2005

I have a deadlock situation, part of the problem looks like this;

spid ecid dbid ObjId IndId Type Resource Mode
Status
------ ------ ------ ----------- ------ ---- ---------------- -------
------
404 0 9 792389892 1 KEY (010086470766) SIU
WAIT
72 0 9 792389892 1 KEY (010086470766) SIU
WAIT
115 0 9 792389892 1 KEY (010086470766) SIU
WAIT
61 0 9 792389892 1 KEY (010086470766) IS
WAIT
318 0 9 792389892 1 KEY (010086470766) SIU
WAIT
430 0 9 1112391032 1 KEY (010086470766) X
GRANT

They are key locks I am used to the resource value generally being
unique by table. I am wondering if the other 'WAIT's are indeed
waiting based on the 'unique' resource value. Note that the exclusive
grant is on a different table but, the resource rsc_text value is the
same. Looking it up I get for a key lock that it's a hashed value, my
referance tells me what is is for a non-clustered index but, does not
explain what it would be for a clustered index.

Does it protect this resource based exclusively on resource rsc_text or
is it unique by ObjID/Rsc_text, has anyone seen this before?
Suggestions?

SQL Server 2000/SP3

-Chris

View 1 Replies


ADVERTISEMENT

SQL Jobs - Cannot Obtain A LOCK Resource At This Time

May 24, 2007

Hi All,



We recently bought a new (sql) database server with 8 gb ram. I started moving the databases from our older 2005-sql to the new one. Everything goes well, except...



Some steps in our jobs do a truncate table of a delete from... When the job is running and it reaches the step where the truncation/deleting starts, it stops its execution and gives the following error :




Code Snippet

The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions. [SQLSTATE HY000] (Error 1204). The step failed.




When I try to execute the procedure that does the truncation manually, it works perfect. Do you guys have an idea on what the cause of this error might be ?



Thanks a lot in advance !



(FYI: we use the enterprise edition of sql server 2005)



Grtz, Koen

View 9 Replies View Related

Dead Lock In Table Contains Text Column

Feb 16, 2001

Hi Frineds

I have a table with contains Text column. and which is accessed by each page of the site. It is getting frequent Dead Lock Any body can suggest me a good solution pl.

Thanks.

MuraliB

View 1 Replies View Related

Optimized Way To Store Hashed Values?

Jul 12, 2007

What is the most optimized way to store Hashed values (obtained by Object.GetHashCode() method) in SQL Server?

Thanks.

View 4 Replies View Related

CREATE LOGIN *** WITH PASSWORD=0x*** HASHED

Oct 20, 2007

Hello,
Could anybody explain: is following supposed to work:



CREATE LOGIN test


WITH PASSWORD=0xF1E9E5CA9A79F7B5D883FA4D9680ED1D4D9AAB12 HASHED,

CHECK_POLICY = OFF;
GO

where

0xF1E9E5CA9A79F7B5D883FA4D9680ED1D4D9AAB12
result of

SELECT HASHBYTES ('SHA1','$Test123#')


execution of 'create login' results in following error

Msg 15021, Level 16, State 2, Line 1

Invalid value given for parameter PASSWORD. Specify a valid parameter value.

Interesting enough is that if I use MD5 the hash is 8 bytes shorter and create login works but actual login procedure does not. And if I just use plain text password without HASHED everything works.

This is on sqlexpress 2005 sp2. Is this specific to express version?
I've noticed that realatively old SQL BO 2005 states that hashed password should be passed as literal in single quotations ' *** ' (and it does not work) and msdn online states that in case of HASHED hexadecimal value should be passed without single quotations, anyway does not work either ...

Thanks,

--Alex

View 4 Replies View Related

Request: Actual Example Of Create Login With Password Hashed

Apr 16, 2008



BOL is very terse on the subject of creating a login with a hashed password. I need to store a script file with a create login for a sql server login, and I don't want the password as plain text. Here is what I've tried:




Code Snippet

declare @input nchar(5), @output varbinary(8000)

set @input = N'A123b'

select @output = hashbytes('sha1', @input)

select @output

create login test with password = '0x22A9EA652CFC38938D56A9C3872B266B192D16D9' hashed

go




This returns the error:


Msg 15021, Level 16, State 2, Line 1

Invalid value given for parameter PASSWORD. Specify a valid parameter value.


Can anybody provide a working example? Am I way off base on the usage of this functionality?

Thanks,

John T

View 12 Replies View Related

SQL 2012 :: Add Unique Numeric Identifier For Text Field With Same Name?

Aug 21, 2014

I have a list of movies that show throughout the year. I would like to assign a unique numeric identifier to each text field.

I have provided some sample data with the output I would like. The Movie_ID in the sample data is just made up, feel free to assign any numeric identifier, preferably of the same length but not a necessity.

create table dbo.Movie_Pre_Fix
(
Report_Monthint,
IDint,
Movie_NameVarchar(50)
);
insert into dbo.Movie_Pre_Fix (Report_Month, ID,Movie_Name)
VALUES
(201406,0721312144,'SAW'),

[code]....

View 6 Replies View Related

Error: A Deadlock Was Detected While Trying To Lock Variable X For Read Access. A Lock Could Not Be Acquired After 16 Attempts

Feb 2, 2007

I simply made my script task (or any other task) fail

In my package error handler i have a Exec SQL task - for Stored Proc

SP statement is set in following expression (works fine in design time):

"EXEC [dbo].[us_sp_Insert_STG_FEED_EVENT_LOG] @FEED_ID= " + (DT_WSTR,10) @[User::FEED_ID] + ", @FEED_EVENT_LOG_TYPE_ID = 3, @STARTED_ON = '"+(DT_WSTR,30)@[System::StartTime] +"', @ENDED_ON = NULL, @message = 'Package failed. ErrorCode: "+(DT_WSTR,10)@[System::ErrorCode]+" ErrorMsg: "+@[System::ErrorDescription]+"', @FILES_PROCESSED = '" + @[User::t_ProcessedFiles] + "', @PKG_EXECUTION_ID = '" + @[System::ExecutionInstanceGUID] + "'"

From progress:

Error: The Script returned a failure result.
Task SCR REIL Data failed

OnError - Task SQL Insert Error Msg
Error: A deadlock was detected while trying to lock variable "System::ErrorCode, System::ErrorDescription, System::ExecutionInstanceGUID, System::StartTime, User::FEED_ID, User::t_ProcessedFiles" for read access. A lock could not be acquired after 16 attempts and timed out.
Error: The expression ""EXEC [dbo].[us_sp_Insert_STG_FEED_EVENT_LOG] @FEED_ID= " + (DT_WSTR,10) @[User::FEED_ID] + ", @FEED_EVENT_LOG_TYPE_ID = 3, @STARTED_ON = '"+(DT_WSTR,30)@[System::StartTime] +"', @ENDED_ON = NULL, @message = 'Package failed. ErrorCode: "+(DT_WSTR,10)@[System::ErrorCode]+" ErrorMsg: "+@[System::ErrorDescription]+"', @FILES_PROCESSED = '" + @[User::t_ProcessedFiles] + "', @PKG_EXECUTION_ID = '" + @[System::ExecutionInstanceGUID] + "'"" on property "SqlStatementSource" cannot be evaluated. Modify the expression to be valid.

Warning: The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

And how did I get 4 errors? - I only set my script task result to failure

View 11 Replies View Related

Row Lock Versus Page Lock In SQL 2000.

Apr 7, 2004

Hi
We are facing an acute situation in our web-application. Technology is ASP.NEt/VB.NET, SQL Server 2000.

Consider a scenario in which User 1 is clicking on a button which calls a SQL stored procedure. This procedure selects Group A of records of Database Page1.

At the same time if User 2 also clicks the same button which calls same SQL stored procedure. This procedure selects Group B of records of Database Page1.

So, its the same Page1 but different sets of records. At this moment, both the calls have shared locked on the Page1 inside the procedure.

Now, in call 1, inside the procedure after selecting Group A of records, the next statement is and update to those records. As soon as update statement executes, SQL Server throws a deadlock exception as follows :

Transaction (Process ID 78) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction

We are able to understand why its happening. Its because, Group A and Group B of records are on the same Page1. But both the users have shared lock on the Page1. So, no one gets the exclusive lock in records for update, even though, the records are different.

How can I resolve this issue? How can I get lock on wanted rows instead of entire page?

Please advice. Thanks a bunch.

Pankaj

View 1 Replies View Related

Error : 2827: Procedure In Procedure Buffer 0x7acad6c Is Not Properly Hashed

Mar 19, 1999

Error : 2827, Severity: 20, State: 1
Procedure <proc name> in procedure buffer 0x7acad6c is not properly hashed.
...??

any ideas?
thanks

View 4 Replies View Related

ERROR: A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List.

May 22, 2006

Hi,
I have set of 2 DTS packages, one of which calls the other by forming a command-line (dtexec) using a Execute Process task.

From the parent package-> Execute Process Task->
dtsexec /F etc... /<pkg variable> = "servername"

Each of the parent and the called package have a variable: "User::DWServerSQLInstance" which is mapped to the SQL server connection manager server name property using an expression. The outer package has the above variable and so does the inner called package (which gets assigned through the command line from the outerpackage call to inner)

I "sometimes" get the following error:

OnError,I4,TESTDOMAdministrator,ACDWAggregation,{A1F8E43F-15F1-4685-8C18-6866AB31E62B},{77B2F3C7-6756-46EB-8C01-D880598FB4B3},5/22/2006 5:10:28 PM,5/22/2006 5:10:28 PM,-1073659822,0x,The variable "User::DWServerSQLInstance" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

Help would be appreciated!

I have seen other posts on this but, not able to relate the solution to my scenario.

View 9 Replies View Related

A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List

May 10, 2006

Hi All,



I have seen a few other people have this error.

Package works fine when run from BIDS, DTExec, dtexecui. When I schedule it, It get these random errors. (See below)

The main culprit is a variable called "RecordsetFileDIR" which is set using an expression. (@[User::_ROOT] + "RecordSets\")

A number of other variables use this as part of their expression and as they all fail, pretty much everything dies.

I have installed SP1 (Not Beta) on server. Package uses config files to set the value of _ROOT.



The error does not always seem to be with this particular variable though. Always a variable that uses an expression but errors are random. Also, It will run 3 out of 10 times without a problem. I am the only person on the server at the time.

Any ideas?



Cheers,

Crispin



Error log:

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073659822,0x,The variable "User::RecordsetFileDIR" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073639420,0x,The expression for variable "rsHeaderFile" failed evaluation. There was an error in the expression.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

View 1 Replies View Related

SQL Server 2012 :: Failing On Update With Unique Index Error (Not Unique)

Jul 5, 2015

This index is not unique

ix_report_history_creative_id

Msg 2601, Level 14, State 1, Procedure DFP_report_load, Line 161
Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'.

The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324).
Msg 3621, Level 0, State 0, Procedure DFP_report_load, Line 161

The statement has been terminated.

Exception in Task: Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'. The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324).

The statement has been terminated.

View 6 Replies View Related

How To Lock A Table So Others Cannot Lock It

May 23, 2001

Hi,

I want to lock a table so others cannot lock it but able to read it inside transactions.

The coding I need is something like this: set implicit_transactions on begin transaction select * from table1 with (tablock, holdlock) update table2 set field1 = 'test' commit transaction commit transaction

I have tried the coding above, it won't prevent others from locking table1.

So, I changed the tablock to tablockx to prevent others from locking table1. But this will also prevent others from reading table1. So, how can I lock table1 so others cannot lock it but still able to read it?

Thank you for any help

View 1 Replies View Related

What Is The Difference Between A UNIQUE INDEX And A UNIQUE CONSTRAINT?

Sep 22, 2004

A UNIQUE INDEX must inherently impose a unique constraint and a UNIQUE CONSTRAINT is most likely implemented via a UNIQUE INDEX. So what is the difference? When you create in Enterprise Manager you must select one or the other.

View 8 Replies View Related

Unique Constraint Vs Unique Index In MS SQL 2000

Jul 20, 2005

HelloWhat should I use for better perfomance sinceunique constraint always use index ?ThanksKamil

View 5 Replies View Related

Unique Constraint And Unique Index, What's The Difference?

Jun 24, 2006

What's the difference in the effect of the followings:
CREATE UNIQUE NONCLUSTERED INDEX
and
ALTER TABLE dbo.titles ADD CONSTRAINT
titleind UNIQUE NONCLUSTERED

I found there're two settings in Indexs/Keys dialog box of the management studio, Is Unique, and Type. The DDL statements above are generated by setting Is Unique to yes plus Type to Index, and just Type to Unique Key, respectively. What's the difference between them?

View 1 Replies View Related

Unique Index Vs Unique Constraint

Mar 7, 2001

Hi everyone,
I need urgent help to resolve this issue...
As far as the performance goes which one is better..
Unique Index(col1, col2) OR Unique constraint(col1, col2) ?
Unique constraint automatically adds a unique index
and unique index takes care of uniqueness then whats the use of unique constraint ?

Which one do one use ?

thanks
sonali

View 4 Replies View Related

Unique Constraint Vs Unique Index

Jan 20, 2006

BOL says a unique constraint is preferred over a unique index. It also states that a unique constraint creates a unique index. What then is the difference between the two, and why is a constraint preferred over the index?

View 2 Replies View Related

Unique Index Vs Unique Constraints

Mar 26, 2008



hi team,
.Can i create umique constraint with out unique index.when i am creating a unique constraint sql creates a unique index (default) can i have only unique constraint ?

View 12 Replies View Related

How To Select Unique Row When Entire Row Not Unique?

Mar 12, 2008

I am having a problem trying to figure out the best way to get the results I need. I have a table of part numbers that is joined with a table of notes. The table of notes is specific to the part number and user. A row in the notes table is only created if the user has entered notes on that part number. I need to create a search that grabs all matches on a keyword and returns the records. The problem is that it currently returns a row from the parts table with no notes and a separate row with the notes included if they had created an entry. It seems like this should be easy but it eludes me today.
Here is the code



Code Snippet
create procedure SearchPartKeyword
(
@Keyword varchar(250) = null,
@Universal_Id varchar(10) = null
)
as
select p.PartNumber, p.Description, p.ServiceOrderable, n.MyNotes, p.LargestAssembly, p.DMM,
p.Legacy, p.Folder, p.Printer
from Parts p inner join notes n on p.PartNumber = n.Identifier
where n.Universal_ID = @Universal_ID and p.Description like @Keyword
union
select p.PartNumber, p.Description, p.ServiceOrderable, '' as MyNotes, p.LargestAssembly,
p.DMM, p.Legacy, p.Folder, p.Printer
from Parts p
where p.Description like @Keyword





and the results:
PartNo Description SO Notes LA DMM Legacy Folder Printer
de90008 MAIN BOARD 1 DGF1 114688 0 0 0
de90008 MAIN BOARD 1 I love this part Really I do DGF1 114688 0 0 0

This could return multiple part numbers and If they have entered notes I want the row with the notes

Thank You
Dominic Mancl

View 1 Replies View Related

What 's Difference Between Unique Key And Unique Index

Nov 13, 2007

What 's difference between Unique key and unique index in SQL server 2005?

View 9 Replies View Related

Resource Limits ??

Apr 11, 2007

In Oracle & Sybase you can set login resource limits to restrict, time of day, number of i-o's, cpu use etc for any login, at the login method. All actions done from a resource limit constrained login inherit the constraints.

Is there any way to implment this with any MS SQL Server version from 200-2005/SP2?

Before anyone answers, please do not suggest set rowcount etc.
thanks.

View 1 Replies View Related

Resource DB Path

Apr 14, 2008

How to find the physical path of resource db files from SSMS query?

------------------------
I think, therefore I am - Rene Descartes

View 7 Replies View Related

Deadlock Resource ID

Mar 4, 2008

I have a deadlock chain that shows 9 parallel insert jobs into the same table. The resource that is locked (with an exclusive lock) shows a HOBT_ID...which corresponds to a clustered index.

My question is how would INSERT statements cause a whole index to lock (there is no TABLOCK hint).

View 6 Replies View Related

Resource Files In A Rdl???

Feb 25, 2008

Hi,



I would like to know witch is the best practices to make a .rdl file multilenguaje, that is, that the same .rdl file shows the text €śAmount€? on a label when the user is English or the text €śCantidad€? when the user is Spanish.

There are not something like the resource files in the in a VS.NET web application????



Thanks,

View 4 Replies View Related

SSIS Resource

Nov 9, 2006

Hi Community:

I am new to SSIS, and have been struggling recently with SSIS development. I would like to find out if there are some good books out there on SSIS besides, the online resources, and BOL. Possibly a good book or tutorials. Thanks.





MA

View 4 Replies View Related

Resource Files In A Rdl????

Feb 25, 2008

Hi,



I would like to know witch is the best practices to make a .rdl file multilenguaje, that is, that the same .rdl file shows the text €śAmount€? on a label when the user is English or the text €śCantidad€? when the user is Spanish.

There are not something like the resource files in the in a VS.NET web application????



Thanks,

View 1 Replies View Related

CASE Resource Info

May 2, 2001

What are some good CASE programming to use in comjuction with SQL 7. What are some good resources for researching. Also, are there any good DB confrences coming up?

View 1 Replies View Related

I Need To Locate The MS SQL Server 7 Resource Kit

Dec 14, 1999

How can I get my hands on the Microsoft SQL Server resource kit?
In particular, I need the "Load Simulator" application.

Any information would be greatly appreciated.

Jim

View 1 Replies View Related

Cursor Resource Usage

Jun 16, 2000

I use cursors inside stored procedures, they are generally 20 - 50 records. I have been told that cursors are very resource intensive. Am I setting myself up for scaling problems when we have hundreds of users all running these procedures? The cursors are only used within the context of the stored procedure. Any opinions/insight on this would be appreciated.

Mike

View 4 Replies View Related

Resource Problem With Cursor --&> Help

Mar 26, 2003

I'm attempting to update a table of around 100,000 records with a table of 20,000 records using a cursor since the update is based on a row by row criteria. When doing this I'm getting an error

--Resource is low some results are dropped--

I then cut down the table with 20,000 to a table of 5,000 and still get the same error. I've also tried to use a fast_forward cursor but still no luck
Can any-one help. I know there is a way to do this using a quick update statement but I need to know this for other insert statements anyway.
Help Help

View 4 Replies View Related

Instance Will Not Come Up After Moving Resource Db

May 20, 2008

after moving the resource database files with this command:


ALTER DATABASE mssqlsystemresource
MODIFY FILE (NAME=data, FILENAME= 'new_path_of_mastermssqlsystemresource.mdf');
GO
ALTER DATABASE mssqlsystemresource
MODIFY FILE (NAME=log, FILENAME= 'new_path_of_mastermssqlsystemresource.ldf');
GO

I am getting this error trying to do anything in the instance while I have it started in minimal mode (/f /t3608)

(the instance WILL NOT COME UP UNLESS I USE THE /F /T3608 from a command promt.. please .. any suggestions??????????????????????
Also.. I checked and the primary file is NOT READ-ONLY.

File activation failure. The physical file name "E:MSSQLKOCSQLDEV01Datafilesmssqlsystemresource.ldf" may be incorrect.

The log cannot be rebuilt when the primary file is read-only.

File activation failure. The physical file name "E:MSSQLKOCSQLDEV01Datafilesmssqlsystemresource.ldf" may be incorrect.

The log cannot be rebuilt when the primary file is read-only.

Msg 945, Level 14, State 2, Line 1

Database 'mssqlsystemresource' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

Msg 5069, Level 16, State 1, Line 1

ALTER DATABASE statement failed.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved