Simple to judge the MSSQL database version (2000 or _mssql)

Source: Internet
Author: User

One of the most interesting things you've found in the recent migration of MSSQL databases is that you can use a single statement to determine the version of the MSSQL database (the accuracy is not high):

SELECT * FROM Sys.servers

If you return the following information, you should be a 2000 database:

Message 208, Level 16, State 1, line 1th
Object name ' Sys.servers ' is invalid.

Conversely, if you return a message similar to the following, you might have a 2005 database

1 www-host SQL Server SQLNCLI www-host null NULL NULL 0

Reason: Sys.servers This object is not in 2000, in 2005.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.