What Is The N In Object_id(N'authusers')

May 14, 2001

Could someone explain the use of N when using OBJECT_ID or OBJECTPROPERTY
Any help at all is welcome thankyou
Ann

View 1 Replies


ADVERTISEMENT

Logic Behind Object_ID

May 19, 2007


I have 2 basic requirements as below,

1) Comparing 2 versions of same database.
2) Keeping track of schema versions of Tables & Stored Procedures so that I can rollback to previous schema.

I have started with Sys.Objects, Sys.Tables & Sys.Columns and I kept things rely on Object_ID but the problem started whenever I change some part of Table. It assigns new Object_ID to the table whenever I change it; moreover creationdate of object is also changed. So I assume that it drops and creates new table.

Please throw some light on following questions,
1) When and How Object_ID Changes?
2) Is there any other thing in database which is Unique & Not Changing with alteration of object?
3) What should be the preferred way to Compare 2 Database?

I hate readymade tools as they charge per user and my requirements are very small.

Thanking you,

View 4 Replies View Related

Object_id Numbers On Same Server

Aug 23, 2000

I restored a development database to a test database on the same server. I thought this would be a good
thing to do because testers would have the same data as developers and the tables would be exactly alike.
However, I noticed that the object_id is identical for the tables. For example, the Accounting Calendar in the development
database and the Accounting Calendar in the test database have the same Object_id. Could anyone verify that
this is or is not going to cause me trouble?

View 4 Replies View Related

Help: Should Sys.service_queues.object_id Be Subset Of Sys.dm_broker_queue_monitors.queue_id?

Apr 4, 2007



I am having trouble sending messages between service broker, set up on 2 different machine ( different domain ). The ports on which service brokers listening are bidirectional.



for some reason the messages get piled up at the sys.transmission_queue and transmission_status seems to be empty.



I found the following link and tried to find status of all message queues.

http://msdn2.microsoft.com/en-us/library/ms177628.aspx

SELECT t1.name AS [Service_Name], t3.name AS [Schema_Name], t2.name AS [Queue_Name],
CASE WHEN t4.state IS NULL THEN 'Not available'
ELSE t4.state
END AS [Queue_State],
CASE WHEN t4.tasks_waiting IS NULL THEN '--'
ELSE CONVERT(VARCHAR, t4.tasks_waiting)
END AS tasks_waiting,
CASE WHEN t4.last_activated_time IS NULL THEN '--'
ELSE CONVERT(varchar, t4.last_activated_time)
END AS last_activated_time ,
CASE WHEN t4.last_empty_rowset_time IS NULL THEN '--'
ELSE CONVERT(varchar,t4.last_empty_rowset_time)
END AS last_empty_rowset_time,
(
SELECT COUNT(*)
FROM sys.transmission_queue t6
WHERE (t6.from_service_name = t1.name) ) AS [Tran_Message_Count]
FROM sys.services t1 INNER JOIN sys.service_queues t2
ON ( t1.service_queue_id = t2.object_id )
INNER JOIN sys.schemas t3 ON ( t2.schema_id = t3.schema_id )
LEFT OUTER JOIN sys.dm_broker_queue_monitors t4
ON ( t2.object_id = t4.queue_id AND t4.database_id = DB_ID() )
INNER JOIN sys.databases t5 ON ( t5.database_id = DB_ID() )



What I noticed is the values of sys.service_queues.object_id and sys.dm_broker_queue_monitors.queue_id are totally different. I am not sure whether this has any impact on why the messages are stuck at transmission_queue



object_id

-----------

21575115

1977058079

2009058193

2041058307

2073058421

2105058535

2137058649

(7 row(s) affected)

queue_id

-----------

864722133

896722247

(2 row(s) affected)

View 4 Replies View Related







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