Returns the database object name for schema-scoped objects.
OBJECT_NAME ( object_id [, database_id ] )
Is the ID of the object to be used. object_id is int and is assumed to be a schema-scoped object in the specified database, or in the current database context.
Is the ID of the database where the object is to be looked up. database_id is int.
SELECT DISTINCT OBJECT_NAME(object_id) FROM master.sys.objects;