I created a new database on a SQL 2005 server, which also contains other
databases. I just tried to run "select * from
information_schema.constraint_table_usage" and got an error Msg 208, Level
16, State 1, Line 1
Invalid object name 'information_schema.constraint_table_usage'.
However I can run the select statement on the other databases and get the
information back.
Anyone have any idea why it wouldn't work on one database but does on other's.
Thanks in advance.Possibly a permissions issue?
"scuba79" <scuba79@.discussions.microsoft.com> wrote in message
news:4835E0D8-D980-4C60-A2D2-A6BDFAD2D91D@.microsoft.com...
>I created a new database on a SQL 2005 server, which also contains other
> databases. I just tried to run "select * from
> information_schema.constraint_table_usage" and got an error Msg 208, Level
> 16, State 1, Line 1
> Invalid object name 'information_schema.constraint_table_usage'.
> However I can run the select statement on the other databases and get the
> information back.
> Anyone have any idea why it wouldn't work on one database but does on
> other's.
> Thanks in advance.|||My guess is that the database is case-sensitive. The info schema view names are all upper-case.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"scuba79" <scuba79@.discussions.microsoft.com> wrote in message
news:4835E0D8-D980-4C60-A2D2-A6BDFAD2D91D@.microsoft.com...
>I created a new database on a SQL 2005 server, which also contains other
> databases. I just tried to run "select * from
> information_schema.constraint_table_usage" and got an error Msg 208, Level
> 16, State 1, Line 1
> Invalid object name 'information_schema.constraint_table_usage'.
> However I can run the select statement on the other databases and get the
> information back.
> Anyone have any idea why it wouldn't work on one database but does on other's.
> Thanks in advance.|||> My guess is that the database is case-sensitive. The info schema view
> names are all upper-case.
Of course, duh. I was going to suggest compatibility level next. :-)|||That was the issue, thought I created it case-insensitive...
"Tibor Karaszi" wrote:
> My guess is that the database is case-sensitive. The info schema view names are all upper-case.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "scuba79" <scuba79@.discussions.microsoft.com> wrote in message
> news:4835E0D8-D980-4C60-A2D2-A6BDFAD2D91D@.microsoft.com...
> >I created a new database on a SQL 2005 server, which also contains other
> > databases. I just tried to run "select * from
> > information_schema.constraint_table_usage" and got an error Msg 208, Level
> > 16, State 1, Line 1
> > Invalid object name 'information_schema.constraint_table_usage'.
> >
> > However I can run the select statement on the other databases and get the
> > information back.
> >
> > Anyone have any idea why it wouldn't work on one database but does on other's.
> >
> > Thanks in advance.
>
>sql
No comments:
Post a Comment