Quick SQL Server 2000 Locking Question

Nov 28, 2005

We are running a 3rd party ETL tool to populate a denormailized version of a production database for reports. Everything works fine 95% of the time. However there is a semi-rare occurence of the ETL tool hanging up. The norm is for the tool to take about 5 times longer than usual, but it still works. Over the weekend however it through an error saying:

The SQL Server cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users or ask the system administrator to check the SQL Server lock and memory configuration.

The reports are run through Crystal using stored procs and are all basically select statements

So my question(s) are the following:
1. What kind of lock would a report put on a table (select statement)
2. Would it make sense to change stored procs to use WITH NOLOCK?
3. Or is something else going on?

Your thoughts would be greatly appreciated.

View 5 Replies


ADVERTISEMENT

Access 2000 Frontend MS SQL 2000 Backend - Locking Problems

Aug 20, 2007

We are using an Access 2000 project to view our SQL Tables and using Access 2000 Runtime to Access the forms in the project. We have written in a locking system in VB and removed the video controls to prevent users from accessing the same records. But of course now we need to make the video controls available. This has now thrown up the problem of multiple users accessing the same records. We have tried to write code to lock records when then video controls are used but this is not working as well as we hoped. Can anyone please suggest any way of setting up locking on SQL using triggers from the Access frontend? or any other types of locking systems that could be written in the Access front end.

View 1 Replies View Related

Quick Question About Security And MS SQL 2000

Oct 20, 2004

OK, we have a couple of MS SQL 2000 servers running in a Win2k AD domain.

Both machines are using mixed mode security, the issue appears to be this.

If I go into AD and change a groups name that has been granted access to
the SQL server, it doesn't seem to pick up on the name change.

I also can't add the new name to the SQL server, because of a conflict of a
SID.

So how do I get the MS SQL server to refresh the names of the native NT
groups that have been granted access, then have the names changed ??

View 3 Replies View Related

SQL 2000 - Row Level Locking

Jul 20, 2005

Hi,We have encountered deadlock on a table which is used to generatesequential numbers for different categories eg typical entriesCategory ValueTRADE_NO 1456JOB_NO 267.....The applications reference the relevant category applicable to themand updatethe Value accordingly. This is table is very small, occupying 1 page.However, it has no index as it was not seen to be appropriate for atable this size.However, can someone please advise whether1. An index is required for row level locking2. If an index on a table as small as above is likely to reduce thedeadlock rate.Also, please consider the following but which I am not sure isrelevant for above query.We noted that when we migrated the database concerned from SQL 6.5 toSQL 2000, using DTS, that the database was NOT strictly in SQL 2000format for non clustered indexes (NC) ie the clustered key was notpart of the NC index until the clustered index was rebuilt.Given this should I just rebuild this table with a fake index and dropit thereafter.We are aware of the different techniques used to avoid deadlocks (egtables accessed in same order etc) and have , as much as possible,implemented those practices.I thank you in advance for any help you may be able to offer.ThanksPuvendran

View 12 Replies View Related

Problem Due To Locking In MSSQLServer 2000

Jul 15, 2003

Insert or update statements seems to be locking entire page or table rather than locking
the corresponding row to be inserted or updated.

lets assume the table with 3 rows.

scenario 1)
In transaction A, I'm updating the 3'rd row. and in another transaction B I'm reading
row 1.
Transaction B seems to be waiting for transaction A to finish before returning the select results.


Scenario 2)
In transaction A, I'm inserting new row (4'th row) and in another transaction B I'm reading
row 1.
here as well trasaction B does not return the row 1 unless transaction A is complete.
Select operation is blocked due to insert.


Ideally in both the scenarios , read operation should have returned the results without waiting
for update/insert to finish. As the read is being done on different rows than that of being updated
or inserted.
I have tried both the insert/update as well as select queries with all the possible locking hints
such as ROWLOCK, READCOMMITED, UPDLOCK etc...
The only way select query returns the row without blocking is by using the NOLOCK locking hint. But then this is
not the proper solution as it gives us the dirty read.

Please suggest me any solution or workaround for above issue.

View 1 Replies View Related

MSSQL 2000, ODBC, Tempdb, Locking

May 14, 2002

Hi, I wonder if anyone can shed some light on this issue -

We have a client/server program for MSSQL7 and MSSQL2000.
When running client/server - we have our own broker, etc,
the program ends up locking itself on SQL2000; this is not a problem on SQL7.
We noticed that it seems some system tables locking tempdb.
We also noticed that SQL2000 no longer has insert-into/bulkcopy option like SQL7. But, here we don't have temporary tables at all. It's just that we found the lockings in tempdb caused by some sysobjects, sysindexes, etc.
Also, this does not happen to all the systems we have. Some of our machine does not have the self-lock problem; most of the machines have this problem though.

If we don't run client/server, then the program works fine.
Same logic, the difference is when we use client/server logic to connect to the remote SQLServer 2000 server, the locking might happen on most of our machines.

Anyone is familiar with tempdb and locking issues, please provide some hint??? Is it possible that there are some system parameters that we can set to avoid the problem. We haven't found out why some of our machines do not have problem, while most of the machines have this locking problem.

The program is written using ODBC.

Many thanks in advance.

HIBA International

View 2 Replies View Related

Force Row Level Locking In SQLServer 2000 ?

Jul 20, 2005

HiIs it possible to force row level locking in one or more tables insome database. We have some problems when SQL Server decides to choosepage- or table-level locking.We are using SQL Server 2000.Best regardsAarno

View 1 Replies View Related

Recently Updated To Sql 2005 From Sql 2000 Now Recieving Locking Problems

Apr 24, 2008



Good afternoon everyone,

I hope that I am not asking a question which has been answered many times in the past, I did a search but could not find an answer. These may be beginner questions, so bear with me as I am something of a beginner.

This week our organization updated from SQL 2000 to SQL 2005. We are using a Microsoft Access front end for this data and the information is entered through forms into the correct tables. When our researchers are enter the information they also have to sometimes search existing information to ensure they do not duplicate what is already in there. For this we use several access queries. This has worked well on the SQL 2000 server without any issues. However, now that we are on 2005 we are starting to recieve ODBC Call fail errors and errors which specify that they are a result of a deadlock. My first question is, are the ODBC call fail errors possibly locks which caused the ODBC connection to time out? My second question is why am I recieving these errors in 2005 but not 2000?


Thanks in advance for any help

- Hitz

View 1 Replies View Related

Just A Quick Sql Server Question.....

Jan 17, 2006

one of our sql server servers has an instance of sql server running on it and it's name is just (local)
how can i rename it?
 

View 5 Replies View Related

Quick Question About SQL Server 7 Datatypes

Jul 8, 2004

What is the equivilent datatype in SQL server 7 for the Access database memo field?

View 1 Replies View Related

Quick SQL Server 7.0 Index Question

Jul 23, 2005

At the moment I only know enough about SQL Server to create the databases Ineed as a backend for the various internal desktop/web applications I write.I haven't ever had the time to get seriously involved with internal workingsof SQL Server and we are far too small to employ a DBA.With any new application performance isn't a problem as the number ofrecords is very low. Over the life of the application the number of recordsobviously increases and performance can start to suffer. My normal cure isto use the Query Analyzer to suggest and implement indexes that normally getthings back up to speed.I was wondering whether SQL Server automatically keeps the created indexesup to date or do I need to be doing anything else either manually or as ascheduled job? The databases all have auto create statistics and auto updatestatistics enabled.Any pointers gratefully receivedThanksAlan

View 3 Replies View Related

SQL Server 2008 :: Quick GUI To Run Script On Database

Aug 19, 2015

Any way to build a small GUI that a user can input the parameter, then click a submit button, which will in turn run a script on the database and pass the value to the query. I am sure there is a quick and easy way, but cannot think of one at the moment.

This is a quick script that I am running for a user too often, and don't really want to give them server access or ssms on their machine.

View 5 Replies View Related

Quick Question On SQL Server And Object Support

Jul 23, 2005

Hi folksI am not at all an SQL server guy (more of an Oracle developer.)I wanted to know if you guys could tell me if SQL Server supportsobjects in the database. If so, could you kindly point me to adoc or a very quick overview of main object features?Many thanx!

View 8 Replies View Related

Oracle Server Quick Reference Guide

May 29, 2006

Oracle Server Quick Reference Guidehttp://quickdba.blogspot.com/2006/0...ence-guide.htmlVisit daily to get more updated articles

View 1 Replies View Related

Need A Quick Answer About Reporting Services In SQL Server 2005?

Jun 26, 2007

Hi all,

I apologize in advance for the lack of homework before posting, but I am just looking for a quick answer, or a quick point in the right direction to figure this out.

I have a developer from an adjacent team that wants to use Reporting Services in a SQL Server 2005 installation.

From what I found online during what I thought was a definitive search yesterday, I gave him the MSDN SQL Server 2005 DVD and told him that Reporting Services is now part of the standard installation. Which is what my brief search yesterday indicated to me.

He did the installation (full, according to him) and said he could not find Reporting Services.

So, the quick question is...

Where is Reporting Services in SQL Server 2005? I don't have a separate MSDN DVD that contains it as was the case on SQL Server 2000. This further supports my (wavering) position that it is part of the standard installation.

Thoughts? Direction? Collective kicks in the posterior?

Thanks!

View 6 Replies View Related

SQL Server Row Locking

Jun 28, 2001

I have a table X with 61390 rows on it. IT is a crucial table which is being read and updated constantly. If I create a clustered index on the Primary Key (identity column) and run UPDATE x SET c1 = 1234 where PKCOL = 4321 the best lock I can get is a table Lock. If I create a compound non-clustered index on C1 and PKCOL the best lock I can get is a Page Lock. PAge Lock is OK but as this table is in High demand I want a row lock so others can carry on referenceing other parts of the table. WHy does it take a page lock and not a Row lock?

View 1 Replies View Related

Row Locking In SQL Server 7.0

Jul 7, 1999

Hi,

We are becoming increasingly more involved with SQL Server 7.0 development.
Can someone show me a good example of ROW LOCKING with exclusive and share
modes?
If I am starting a transaction with a SELECT and later an UPDATE, what is
the best way to handle locking?

Thank you for any help on this issue.
Steve

View 1 Replies View Related

Locking Cb On Server

Mar 6, 2007

is there a way of locking db on server. i am doing a overtime and pay system but there is a few members of IT staff that are very nosey and this is senstive information and i dont want them looking at the tables on the server can these be locked for only me to view

View 3 Replies View Related

SQL Server Locking

Mar 22, 2007

Hello,

I'm trying to determine if a row in a table is locked. First, I issue a lock on some rows. Then, I query the syslockinfo table to see which rows are locked. It tells me which rows are locked, but it returns a hashed resource value that, I guess, is somehow related to the key. How can I un-hash the value? Or, how can I hash my own key so that I can compare it with the hashed value? I have tried using the HashBytes function, but I don't know what is actually being hashed when the row is locked.

For example:

begin transaction

select * from test with (rowlock, updlock)

select * from master..syslockinfo

where rsc_objid = (select id from sysobjects where name = 'test') and req_mode = 4

returns:

rsc_text = (010086470766); rsc_bin = 0x000708001374FC020100010086470766

Thanks.

View 3 Replies View Related

Locking SQL Server

Apr 23, 2007

Hi



I have a setting where two Web Servers access the same SQL Server database. To gaurantee consistent data writes and reads I need to lock part of the database in special conditions.



I know exactly when I need particular tables of the database to be locked, but I am in doubt of how to do it. Does SQL Server 2005 have any mechanism for providing locks gauranteed to free the lock if one of the web servers crash - or if SQL Server itself crashes?



/Bezbos

View 1 Replies View Related

Record Locking In ADO.net/Sql Server

Feb 18, 2005

Currently I am working on asp.net Intranet system.I need some suggestion on records locking for Sqlserver & ASP.net.
I want to prevent two user to open the same record for modify.Means if some one has open one record (id=xxxxx) for modify then others should not be able to open same same record (id=xxxxx) for modify .otherwise if both user will open/update same record then information in database will not be updated correctly.
Any idea how we can do the record locking so that not two users can open same record(id=xxxxx) for modify.

Thanks in Advance
Arvind

View 2 Replies View Related

Locking Records In Sql Server

Feb 28, 2006

Hi,
How can i handle record locking in sql server?
 
 

View 1 Replies View Related

How Do I Do Row Level Locking In The Sql Server?

Apr 6, 2001

View 2 Replies View Related

Locking Records In SQL Server From VB.net

Jan 5, 2004

In the application I'm working on, I need to be able to use different locks on my records during certain transactions. I need to know how to do this programmatically from within VB.net. If someone can show me an example of how to do this or show me where I could find some, I'd appreciate that.

Thanks.

View 2 Replies View Related

Locking Problem: SQL Server

Jul 23, 2005

Hi All,According to my observation using SP_WHO2 in my database, some INSERTstatements are getting blocked by SELECT statements. Though theblockingSELECT statement is having ReadPast hint, i think, it will only readpastlocked resources but will not guarantee the select statement itself notblocking other statements(in my case Insert). According to my knowledgeandinformation, select statements take shared locks but why then thesestatements are blocking insert statements?Can there be any other solution other than using NoLock hint as thishintmake sure no shared locks are issued but it can read uncommited data.Need help urgently.ThanksRitesh

View 5 Replies View Related

SQL Server Locking Issues

Dec 8, 2006

How to avoid table locks during simultaneous addition, deletion and updates of 50,000 records or more. I am using SQL Server 2005 interfacing with Java.

Thanks,

View 2 Replies View Related

Sql Server Restart After Locking

Mar 27, 2007

Hi...

i hv a database (sql server 2000) where i got locking on many tables and my application was down.

I restarted the sql server and the application was fine but after five minutes the same locking issue started happening. I did a index rebuild the next time on all indexes and everything was fine.But i cannot relate how locking occured and why it was not after index rebuild.Can anyone shed some light on this or anyone had similar experience... cos i cannot figure out a way on this.

Thanks in advance

View 4 Replies View Related

A Few Questions On Locking In Sql Server 2005

Jan 29, 2008

Hi pardon my ignorance but I wonder if someone could answer a few questions for me.

I am writing a program which will be used by perhaps upto 100 users at a time. The program sits on any number of PCs and loads user specific data to a given PC according to who has logged on to windows on that PC.

A number of data items loaded from the user table have to be unique as they are usernames for other systems that my program simplifies access to.

So when a user logs on to my program for the first time a row is created for them in the user table (indexed by a GUID and their unique network name). The other unique fields are left blank and the user is given an opportunity to fill these details in.

Before writing these details to the user's row in the 'users table' the program loads the whole user table down and checks that these items are unique before committing them to that user's row in the table.

The problem of course is that if between the program downloading the user table into a local datatable, checking the values are unique and then actually writing them someone else writes the same data into their row then 2 users end up with the same data - which shouldn't be allowed. i.e. 2 users can't have the same user name for the other software.

How can I solve this problem with locking? Once the user table is downloaded and in a locel datatable presumably the table is no longer locked so another user could write data to the table.

I acutally think this is going to be a pretty rare occourance but I still want to try to cover all eventualities.

I suspect the problem is the way my program is going about the checking.

Should I use an SQL insert statement like??

If exists(SELECT username from users where username=@username)
BEGIN
RAISEERROR("Username already exists")
END
ELSE
BEGIN
INSERT etc

If so I guess this will simplify my code. Is this the correct thing to do? And then just trap the errors that arise if a duplicate does arise?

Also some more general questions.

1)I presume 2 users simultaneously looking up data from 2 different rows in a table doesn't lock the table so one search fails? I use the code below having set up a command to run a stored procedure to search for a user by their network name.

Dim lclRowRet As SqlDataReader

lclRowRet = LoadUserCommand.ExecuteReader(CommandBehavior.SingleRow)

lclRowRet.Read()

2) I presume writing data to my user table a row at a time will also not cause a lock. I create a command object with all the row values in and then do a command.executenonquery()

As a rule I close all my connections as soon as I'm done with them.

Many thanks for your help in advance.

nik

View 5 Replies View Related

SQL Server Express Is Locking The Database

May 9, 2006

I'm running a website on IIS 6.0 w. ASP.Net 2.0 and SQL Server Express 2005 via the native client. The connection string is fairly standard:

<add name="SiteSqlServer" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=c:DotNetNukeApp_DataASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

I find that after the website has been running for a while I can no longer open the database using SQL Server Management Studio Express (I get an error indicating that the physical file has been locked). Even if I shutdown and restart both IIS and SQL Server, it remains locked and can only be opened once I find and "End Process" all the sqlservr.exe instances from the Task Manager.

Is this a known issue? Any way to find out what is locking the database, or any specific configuration to check?

thanks
Steve

View 1 Replies View Related

Transact SQL :: Row Level Locking In Server

Apr 22, 2015

We have one table.We have updated the status for one column to 1 and we did not committed the transaction. Can we do an another update on another row.

In below example i am updating GEO_D and transaction is not committed. Now my requirement is we have to update other records (not Geo_D). If  try to update GEo_D it should wait. 

IF OBJECT_ID('TEMPDB..##TEMP_STSTUS') IS NOT NULL
DROP TABLE ##TEMP_STSTUS
CREATE TABLE ##TEMP_STSTUS
(
  ID INT IDENTITY(1,1)
  ,NAME VARCHAR(10)
  ,STSTUS VARCHAR(10)
)
INSERT INTO ##TEMP_STSTUS SELECT 'GEO_D','0'

[Code] ....

View 6 Replies View Related

SQL Server Phantom SPIDs Causes Locking And Delays

Nov 10, 2003

A fellow developer of mine has created a ASP.Net application that executes some fairly complex stored procedures. This application is for all intensive purposes a queue and 3 or 4 people work on processing items in a FIFO type environment. There is logic in the Stored procedures to make sure each worker get a unique entry using a series of query hints.

Well what we are seeing is if these works are moving at a rapid pace and we execute an sp_who2 on the sql server there are entries that that seems to be hanging there and REMAINING there even after a browser is closed or the disposed method has been called on the connection object. Has anyone else experienced something similar to this with an ASP.Net application used by mutiple people?

My inclination is to blame the design of the application, but before I do that and step on my co-workers toes I thought I would throw this out to the group.

Thanks in advance for your input.

View 7 Replies View Related

Row Level Locking And SQL Server 6.5 Compatibility Mode

Jan 5, 2001

I'm running SQL Server 7.0. I have a DB running with 6.5 compatibility mode.

Do INSERT, UPDATE or DELETE queries use row level locking in this DB ?

(I know if I set the db compatibility mode to 7.0 row level locking will be enabled)

Thanks in advance for your help.

View 1 Replies View Related

Change SQL Server Query Optimizer Locking

Dec 23, 2004

Hi,

Our app has been distributed on more then 300 different sites.
On one of the sites we get the error "Could not continue scan with NOLOCK due to data movement" indicating that the query optimizer takes a NOLOCK for our select statement ( has been opened with adOpenDynamic, adLockOptimistic ).

It's no option to change the source, we have to solve this without touching the code.

Is there any way to tweak the query optimizer so that our app works correctly?
I know that there will be a reduction of performance but it's our only choose.

thnx in advance,

adOpenDynamic, adLockOptimistic

View 4 Replies View Related







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