WebIn SQL Server, you can query sys.columns. Something like: SELECT t.name FROM sys.columns c inner join sys.tables t on c.object_id = t.object_id WHERE c.name = 'NameID' You might want an additional lookup to resolve the schema name, if you have tables in multiple schemas. you can run this query WebDec 29, 2024 · The SQL Server Database Engine assumes that object_id is in the current database context. The collation of the object definition always matches that of the calling database context. OBJECT_DEFINITION applies to the following object types: C = Check constraint D = Default (constraint or stand-alone) P = SQL stored procedure FN = SQL …
sys.partitions (Transact-SQL) - SQL Server Microsoft Learn
WebNov 10, 2024 · Transact-SQL has a built-in function called OBJECT_NAME () that returns the name of an object, based on its ID. In other words, if you have the object’s ID (for … WebFeb 15, 2024 · To determine the object, we just need to pass your object_id to a query against sys.all_objects (rather than sys.objects ): SELECT name FROM sys.all_objects WHERE object_id = -710746692; And the result: sp_MSreplupdateschema im the weatherman
SQL SERVER - Get Schema Name from Object ID using OBJECT…
WebJan 13, 2024 · T-SQL query to find the list of objects referring Linked Servers One of my client reached out to me today. He was expecting a query that should return the list of objects such as Stored Procedures, Functions, Triggers and View, if it’s using the Linked Server. The query returns the data in format as can be seen in the image below. WebMay 15, 2012 · SELECT OBJECT_SCHEMA_NAME (46623209) AS SchemaName, t.name AS TableName, t.schema_id, t.OBJECT_ID. FROM sys.tables t. WHERE t.name = OBJECT_NAME (46623209) GO. Now, both of the above code give you exact same result. If you remove the WHERE condition it will give you information of all the tables of the … WebFeb 13, 2009 · Finally the problem solved by another method. And I thought to share this. Run –> Control panel –> Administrative Tools –>Services Leave the password blank –> click OK –> Restart the services. It... im the whole damn cake and the cherry on top