Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 INFORMATION_SCHEMA.SCHEMATA in MSSQL 2005

Author  Topic 

jpham
Starting Member

19 Posts

Posted - 2006-07-31 : 19:22:40
Hi All,
There is a change in INFORMATION_SCHEMA.SCHEMATA in 2005 as below:
In earlier versions of SQL Server, the INFORMATION_SCHEMA.SCHEMATA view returned all databases in an instance of SQL Server. In SQL Server 2005, the view returns all schemas in a database. This behavior complies with the SQL Standard. For more information, see SCHEMATA (Transact-SQL).

it broke our application because we have been used:
select count(*) from information_schema.schemata where catalog_name = <database>
and we expected it returned 1 but in MSSQL 2005 it returned 0.
This is a view Microsoft should support backward compatibility. Any comments on this INFORMATION_SCHEMA.SCHEMATA

nr
SQLTeam MVY

12543 Posts

Posted - 2006-08-01 : 06:23:20
The concept of a schema was introduced with v2005 so you would expect things like this to change.
There are limits as to what you can do with backward compatibility - maybe the view in v2000 should have come with a health warning.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -