Showing posts with label line. Show all posts
Showing posts with label line. Show all posts

Wednesday, March 28, 2012

Lock Timeout

I am getting this error on a 2000 server:
"Server: Msg 1222, Level 16, State 54, Line 15
Lock request time out period exceeded."
when I run the following query
"SET ROWCOUNT 10000
declare @.counter bigint
-- Also try 5000, 10000 etc
set @.counter = 0
WHILE 1 = 1
BEGIN
set @.counter = @.counter + 1
print '@.counter = ' + cast(@.counter as varchar(10))
delete from dbname..tabname
where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
IF @.@.ROWCOUNT = 0
BREAK
END
SET ROWCOUNT 0"
I checked in my Query Analyzer options and I've got lock timeout set to 120
seconds. But the above query fails instantly, so it's not even waiting the
120 seconds. What gives? Any tips would be much appreciated.
Nevermind. I figured it out.
"CLM" wrote:

> I am getting this error on a 2000 server:
> "Server: Msg 1222, Level 16, State 54, Line 15
> Lock request time out period exceeded."
> when I run the following query
> "SET ROWCOUNT 10000
> declare @.counter bigint
> -- Also try 5000, 10000 etc
> set @.counter = 0
> WHILE 1 = 1
> BEGIN
> set @.counter = @.counter + 1
> print '@.counter = ' + cast(@.counter as varchar(10))
> delete from dbname..tabname
> where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
> IF @.@.ROWCOUNT = 0
> BREAK
> END
> SET ROWCOUNT 0"
> I checked in my Query Analyzer options and I've got lock timeout set to 120
> seconds. But the above query fails instantly, so it's not even waiting the
> 120 seconds. What gives? Any tips would be much appreciated.
>

Lock Timeout

I am getting this error on a 2000 server:
"Server: Msg 1222, Level 16, State 54, Line 15
Lock request time out period exceeded."
when I run the following query
"SET ROWCOUNT 10000
declare @.counter bigint
-- Also try 5000, 10000 etc
set @.counter = 0
WHILE 1 = 1
BEGIN
set @.counter = @.counter + 1
print '@.counter = ' + cast(@.counter as varchar(10))
delete from dbname..tabname
where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
IF @.@.ROWCOUNT = 0
BREAK
END
SET ROWCOUNT 0"
I checked in my Query Analyzer options and I've got lock timeout set to 120
seconds. But the above query fails instantly, so it's not even waiting the
120 seconds. What gives? Any tips would be much appreciated.Nevermind. I figured it out.
"CLM" wrote:

> I am getting this error on a 2000 server:
> "Server: Msg 1222, Level 16, State 54, Line 15
> Lock request time out period exceeded."
> when I run the following query
> "SET ROWCOUNT 10000
> declare @.counter bigint
> -- Also try 5000, 10000 etc
> set @.counter = 0
> WHILE 1 = 1
> BEGIN
> set @.counter = @.counter + 1
> print '@.counter = ' + cast(@.counter as varchar(10))
> delete from dbname..tabname
> where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
> IF @.@.ROWCOUNT = 0
> BREAK
> END
> SET ROWCOUNT 0"
> I checked in my Query Analyzer options and I've got lock timeout set to 12
0
> seconds. But the above query fails instantly, so it's not even waiting th
e
> 120 seconds. What gives? Any tips would be much appreciated.
>

Lock Timeout

I am getting this error on a 2000 server:
"Server: Msg 1222, Level 16, State 54, Line 15
Lock request time out period exceeded."
when I run the following query
"SET ROWCOUNT 10000
declare @.counter bigint
-- Also try 5000, 10000 etc
set @.counter = 0
WHILE 1 = 1
BEGIN
set @.counter = @.counter + 1
print '@.counter = ' + cast(@.counter as varchar(10))
delete from dbname..tabname
where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
IF @.@.ROWCOUNT = 0
BREAK
END
SET ROWCOUNT 0"
I checked in my Query Analyzer options and I've got lock timeout set to 120
seconds. But the above query fails instantly, so it's not even waiting the
120 seconds. What gives? Any tips would be much appreciated.Nevermind. I figured it out.
"CLM" wrote:
> I am getting this error on a 2000 server:
> "Server: Msg 1222, Level 16, State 54, Line 15
> Lock request time out period exceeded."
> when I run the following query
> "SET ROWCOUNT 10000
> declare @.counter bigint
> -- Also try 5000, 10000 etc
> set @.counter = 0
> WHILE 1 = 1
> BEGIN
> set @.counter = @.counter + 1
> print '@.counter = ' + cast(@.counter as varchar(10))
> delete from dbname..tabname
> where process_dt = CONVERT(SMALLDATETIME,'10/13/2005')
> IF @.@.ROWCOUNT = 0
> BREAK
> END
> SET ROWCOUNT 0"
> I checked in my Query Analyzer options and I've got lock timeout set to 120
> seconds. But the above query fails instantly, so it's not even waiting the
> 120 seconds. What gives? Any tips would be much appreciated.
>

Monday, March 19, 2012

Locate Database Object Given The Page

Hi Folks,

Getting the following error after a DBCC CHECKDB

Server: Msg 8906, Level 16, State 1, Line 1
Page (3:15010) in database ID 9 is allocated in the SGAM (3:3) and PFS (3:8088), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.

Trying to located the object that the allocation has gone to pot over.

Any quick way to resolve a datbase object using a page ID?

Thank In Advancewhoops. not enough coffee.|||"database ID 9" relates to the the entry in master.dbo.sysdatabases

I need to know what object within this database the page is allocated to.

Thanks

Friday, March 9, 2012

localhost

i have a path line in my code, now, i have in the path \\"computername"\sharename\... what i need to do is instead of the "computername", i need to put a variable there to pick the localhost name where the code is runing on.If you're not running a named instance, you could use
declare @.path varchar(255)
select @.path = @.@.servername + '\\sharename'
select @.path
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
> i have a path line in my code, now, i have in the path
\\"computername"\sharename\... what i need to do is instead of the
"computername", i need to put a variable there to pick the localhost name
where the code is runing on.|||SQL Server should handle the word localhost and/or (local) for the server name. Did you try that? If
you want to extract the machine name, you can use the SERVERPROPERTY function (read about it in
Books Online).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
> i have a path line in my code, now, i have in the path \\"computername"\sharename\... what i need
to do is instead of the "computername", i need to put a variable there to pick the localhost name
where the code is runing on.

localhost

i have a path line in my code, now, i have in the path \\"computername"\shar
ename\... what i need to do is instead of the "computername", i need to put
a variable there to pick the localhost name where the code is runing on.If you're not running a named instance, you could use
declare @.path varchar(255)
select @.path = @.@.servername + '\\sharename'
select @.path
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
quote:

> i have a path line in my code, now, i have in the path

\\"computername"\sharename\... what i need to do is instead of the
"computername", i need to put a variable there to pick the localhost name
where the code is runing on.|||SQL Server should handle the word localhost and/or (local) for the server na
me. Did you try that? If
you want to extract the machine name, you can use the SERVERPROPERTY functio
n (read about it in
Books Online).
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
quote:

> i have a path line in my code, now, i have in the path \\"computername"\sharename\... what
i need

to do is instead of the "computername", i need to put a variable there to pi
ck the localhost name
where the code is runing on.

local sql to server sql

I am working on a project that requires pc's on a production line to run a
product testing application. On each pc I would like to have a local sql
database that will have three simple tables. One for product testing
information, one for test results and one for error descriptions. I would
like to link these tables to a server based sql server. In the past, I have
accomplished the same function using Microsoft Access, by creating link
tables to the main sql server, and it has worked quite well. Can I do this
using a local sql server? I've been reading about Sql Server Compact and Sql
Server Express, but I'm not sure which would be better, or if either has the
capability to perform as I need them to. I'd appreciate any help or advice
on this.
Thanks.
Install SQL Server Express on the selected Client computers. And create
Linked Server in the Primary SQL Server to each, computer.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"jfmoyn" wrote:

> I am working on a project that requires pc's on a production line to run a
> product testing application. On each pc I would like to have a local sql
> database that will have three simple tables. One for product testing
> information, one for test results and one for error descriptions. I would
> like to link these tables to a server based sql server. In the past, I have
> accomplished the same function using Microsoft Access, by creating link
> tables to the main sql server, and it has worked quite well. Can I do this
> using a local sql server? I've been reading about Sql Server Compact and Sql
> Server Express, but I'm not sure which would be better, or if either has the
> capability to perform as I need them to. I'd appreciate any help or advice
> on this.
> Thanks.
|||Thanks. I appreciate your help.
"Mohit K. Gupta" wrote:
[vbcol=seagreen]
> Install SQL Server Express on the selected Client computers. And create
> Linked Server in the Primary SQL Server to each, computer.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "jfmoyn" wrote:

local sql to server sql

I am working on a project that requires pc's on a production line to run a
product testing application. On each pc I would like to have a local sql
database that will have three simple tables. One for product testing
information, one for test results and one for error descriptions. I would
like to link these tables to a server based sql server. In the past, I have
accomplished the same function using Microsoft Access, by creating link
tables to the main sql server, and it has worked quite well. Can I do this
using a local sql server? I've been reading about Sql Server Compact and Sq
l
Server Express, but I'm not sure which would be better, or if either has the
capability to perform as I need them to. I'd appreciate any help or advice
on this.
Thanks.Install SQL Server Express on the selected Client computers. And create
Linked Server in the Primary SQL Server to each, computer.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"jfmoyn" wrote:

> I am working on a project that requires pc's on a production line to run a
> product testing application. On each pc I would like to have a local sql
> database that will have three simple tables. One for product testing
> information, one for test results and one for error descriptions. I would
> like to link these tables to a server based sql server. In the past, I ha
ve
> accomplished the same function using Microsoft Access, by creating link
> tables to the main sql server, and it has worked quite well. Can I do thi
s
> using a local sql server? I've been reading about Sql Server Compact and
Sql
> Server Express, but I'm not sure which would be better, or if either has t
he
> capability to perform as I need them to. I'd appreciate any help or advic
e
> on this.
> Thanks.|||Thanks. I appreciate your help.
"Mohit K. Gupta" wrote:
[vbcol=seagreen]
> Install SQL Server Express on the selected Client computers. And create
> Linked Server in the Primary SQL Server to each, computer.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "jfmoyn" wrote:
>

Wednesday, March 7, 2012

local sql to server sql

I am working on a project that requires pc's on a production line to run a
product testing application. On each pc I would like to have a local sql
database that will have three simple tables. One for product testing
information, one for test results and one for error descriptions. I would
like to link these tables to a server based sql server. In the past, I have
accomplished the same function using Microsoft Access, by creating link
tables to the main sql server, and it has worked quite well. Can I do this
using a local sql server? I've been reading about Sql Server Compact and Sql
Server Express, but I'm not sure which would be better, or if either has the
capability to perform as I need them to. I'd appreciate any help or advice
on this.
Thanks.Install SQL Server Express on the selected Client computers. And create
Linked Server in the Primary SQL Server to each, computer.
--
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"jfmoyn" wrote:
> I am working on a project that requires pc's on a production line to run a
> product testing application. On each pc I would like to have a local sql
> database that will have three simple tables. One for product testing
> information, one for test results and one for error descriptions. I would
> like to link these tables to a server based sql server. In the past, I have
> accomplished the same function using Microsoft Access, by creating link
> tables to the main sql server, and it has worked quite well. Can I do this
> using a local sql server? I've been reading about Sql Server Compact and Sql
> Server Express, but I'm not sure which would be better, or if either has the
> capability to perform as I need them to. I'd appreciate any help or advice
> on this.
> Thanks.|||Thanks. I appreciate your help.
"Mohit K. Gupta" wrote:
> Install SQL Server Express on the selected Client computers. And create
> Linked Server in the Primary SQL Server to each, computer.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "jfmoyn" wrote:
> > I am working on a project that requires pc's on a production line to run a
> > product testing application. On each pc I would like to have a local sql
> > database that will have three simple tables. One for product testing
> > information, one for test results and one for error descriptions. I would
> > like to link these tables to a server based sql server. In the past, I have
> > accomplished the same function using Microsoft Access, by creating link
> > tables to the main sql server, and it has worked quite well. Can I do this
> > using a local sql server? I've been reading about Sql Server Compact and Sql
> > Server Express, but I'm not sure which would be better, or if either has the
> > capability to perform as I need them to. I'd appreciate any help or advice
> > on this.
> > Thanks.

Friday, February 24, 2012

Local Cursor question... please help...

ANy idea what I missed?
I am getting this error Server: Msg 16916, Level 16, State 1, Procedure IMPGrpEscalationX, Line 28
A cursor with the name 'crImgGrp' does not exist.

Thank you.

*************

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

ALTER PROCEDURE IMPGrpEscalationX

AS

Declare @.IMID int
Declare @.FS1 int
Declare @.FS2 int

Declare crReqRec cursor local for
select IMID from ImplementationGroup where IMStatus= 'Y'
open crReqRec
fetch next from crReqRec
into @.IMID
Set @.FS1 = @.@.fetch_status

Begin
Set @.IMID = (select IMID from Employees_ImplementationGroup where IMID = @.IMID)

Declare crImpGrp cursor local for
select IMID from Employees_ImplementationGroup where IMID = @.IMID

open crImpGrp

fetch next from crImgGrp
into @.IMID
Set @.FS2 = @.@.Fetch_Status
begin
Print 'test'
End

while @.FS2 = 0

fetch next from crImpGrp into
@.IMID
end
while @.FS1 = 0
fetch next from crReqRec into @.IMID

close crImpGrp
deallocate crImpGrp

FETCH next from crReqRec
into
@.IMID

close crReqRec
deallocate crReqRec

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GOlooks like your cursor is going out of scope when you fetch the second time.|||how can I fixed the out of scope?