I found that there is no object under the schema. Any idea? Thanks in advnace
Hi Stephanie,
Could you please post the exact message that you get?
What is the schema name that you are trying to delete?
Check to see if it owns any objects:
Code Snippet
select count(*) from sys.objects where [schema_id]=schema_id('<schema_name>')Jag
|||The following query should show what objects exist under the schema foo
select name from sys.objects where schema_id = schema_id('foo')
union
select name from sys.types where schema_id = schema_id('foo')
union
select name from sys.xml_schema_collections where schema_id = schema_id('foo')
Some schemas are undroppable: sys, dbo, information_schema
hth,
-Steven Gott
S/DET
SQL Server
|||my schema is called guest and I amended the script
there is no row returned.
No comments:
Post a Comment