August 3, 2016 at 12:08 am
Comments posted to this topic are about the item Stairway to Exploring Database Metadata Level 1: Why Should You Care About the Dynamic Online Catalog?
Best wishes,
Phil Factor
August 3, 2016 at 5:18 am
The next to last section of code is truncated. There is a SELECT with no FROM. Working out the FROM is easy enough but are there other queries missing from that example?
------------
Buy the ticket, take the ride. -- Hunter S. Thompson
August 3, 2016 at 6:35 am
Great training article, thank you.
August 3, 2016 at 7:47 am
@Bryant
Now fixed. Thanks for letting me know.
Best wishes,
Phil Factor
October 17, 2019 at 8:05 pm
Hi all images are broken
December 11, 2019 at 4:04 pm
Nice article! Several image links is broken. In all samples display the schema(i.e object_schema_name(ob.object_id) + '.' + ob.name as User_Table), and describe the importance to always use schema name in conjunction with object name.
February 5, 2020 at 2:12 pm
Several image links are broken. Can someone look into this?
January 13, 2021 at 5:18 am
It is now January 2021, and the image links are still not corrected. Nearly 5 years!!!! This is why SQL Server Central is losing relevance and is becoming just another internet equivalent of a landfill.
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
January 12, 2023 at 7:21 pm
I just noticed that User Defined Table Types do not show up in sys.objects by the name you have given them, you have to look at sys.all_objects and Name LIKE 'TT<Your Type>%' or the Type_Table_Object_ID = Object_ID to find the actual object.
And surprise, surprise - the object is under the 'sys' schema.
-- Find ID in sys.table_types
SELECT *
FROM sys.table_types
WHERE Name = '<Your Type>';
-- Entry in sys.objects
SELECT *
FROM sys.objects
WHERE Name LIKE 'TT%<Your Type%' -- or OBJECT_ID = column value under Type_Table_Object_ID from above;
And, oddly, note that the definition in sys.objects has the is_ms_shipped flag set to 1 ! Not intuitive.
Seems like a flaw.
Doug
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply