Hi friends,
when trying to save a diagram I got an error:
The sp_creatediagram procedure attempted to return a status of NULL, which is not allowed.
Whats with this??I had the same issue an just fixed it by turning the "diagram_id" field in SysDiagrams table to "identitity".
I dropped the table and ran the following script.
CREATE TABLE [dbo].[sysdiagrams](
[name] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[principal_id] [int] NOT NULL,
[diagram_id] [int] identity(1,1),
[version] [int] NULL,
[definition] [varbinary](max) NULL
) ON [PRIMARY]
It worked.
Showing posts with label status. Show all posts
Showing posts with label status. Show all posts
Friday, March 23, 2012
Monday, March 19, 2012
MS SQL Server - LOCK Info
Hi
The system tables syslocks,syslockinfo give information on locked resources, spid, object_id,lock mode, lock status etc.
How will i get object_name
for example if a table is being locked above sys tables give object id, how can i get the actual table name ( object_name)
Please let me know
Best Regards
THNQdigitaljoin with sysobjects table|||You can get it using object_name(object_id) in your select query.
Thanks.
Pat
--------
Originally posted by fridays
join with sysobjects table|||Originally posted by fridays
join with sysobjects table
Hi ,
i found lock info for spid 12 using sp_lock 12
got objid = 'numxxxxxx'
type =TAB
mode=Sch-M and Status = WAIT
i tried joining syslockinfo with sysobjects like below
select si.rsc_objid, si.req_spid , so.name from
SYSLOCKINFO si ,SYSOBJECTS so where
si.req_spid =12 and --si.rsc_type =5 and
si.rsc_objid= 736846995 and so.xtype='U'
This doesnot seem to gimme what i am looking for..
My reqirement is what is Object_Name(objid given by splock spid)
Please advise what am i doign wrong.
Thanks
THNQdigital|||use master
select a.name , b.rsc_objid , c.spid
from sysdatabases a , syslockinfo b , syslocks c
where c.spid = b.req_spid and a.dbid = c.dbid
and c.spid = 'xxxx' and ....
u will know database name 'yyyy' and objid 'zzzzz'
then
select name from yyyy.dbo.sysobjects where id = 'zzzzzz'
Originally posted by THNQdigital
Hi ,
i found lock info for spid 12 using sp_lock 12
got objid = 'numxxxxxx'
type =TAB
mode=Sch-M and Status = WAIT
i tried joining syslockinfo with sysobjects like below
select si.rsc_objid, si.req_spid , so.name from
SYSLOCKINFO si ,SYSOBJECTS so where
si.req_spid =12 and --si.rsc_type =5 and
si.rsc_objid= 736846995 and so.xtype='U'
This doesnot seem to gimme what i am looking for..
My reqirement is what is Object_Name(objid given by splock spid)
Please advise what am i doign wrong.
Thanks
THNQdigital
The system tables syslocks,syslockinfo give information on locked resources, spid, object_id,lock mode, lock status etc.
How will i get object_name
for example if a table is being locked above sys tables give object id, how can i get the actual table name ( object_name)
Please let me know
Best Regards
THNQdigitaljoin with sysobjects table|||You can get it using object_name(object_id) in your select query.
Thanks.
Pat
--------
Originally posted by fridays
join with sysobjects table|||Originally posted by fridays
join with sysobjects table
Hi ,
i found lock info for spid 12 using sp_lock 12
got objid = 'numxxxxxx'
type =TAB
mode=Sch-M and Status = WAIT
i tried joining syslockinfo with sysobjects like below
select si.rsc_objid, si.req_spid , so.name from
SYSLOCKINFO si ,SYSOBJECTS so where
si.req_spid =12 and --si.rsc_type =5 and
si.rsc_objid= 736846995 and so.xtype='U'
This doesnot seem to gimme what i am looking for..
My reqirement is what is Object_Name(objid given by splock spid)
Please advise what am i doign wrong.
Thanks
THNQdigital|||use master
select a.name , b.rsc_objid , c.spid
from sysdatabases a , syslockinfo b , syslocks c
where c.spid = b.req_spid and a.dbid = c.dbid
and c.spid = 'xxxx' and ....
u will know database name 'yyyy' and objid 'zzzzz'
then
select name from yyyy.dbo.sysobjects where id = 'zzzzzz'
Originally posted by THNQdigital
Hi ,
i found lock info for spid 12 using sp_lock 12
got objid = 'numxxxxxx'
type =TAB
mode=Sch-M and Status = WAIT
i tried joining syslockinfo with sysobjects like below
select si.rsc_objid, si.req_spid , so.name from
SYSLOCKINFO si ,SYSOBJECTS so where
si.req_spid =12 and --si.rsc_type =5 and
si.rsc_objid= 736846995 and so.xtype='U'
This doesnot seem to gimme what i am looking for..
My reqirement is what is Object_Name(objid given by splock spid)
Please advise what am i doign wrong.
Thanks
THNQdigital
Subscribe to:
Posts (Atom)