在SQL Server服务器上,打开查询分析器,使用如下命令来执行sp_server_info存储过程。

execute sp_server_info

attribute_id attribute_name                                               attribute_value

------------ ------------------------------------------------------------ --------------------

1            DBMS_NAME                                                    Microsoft SQL Server

2            DBMS_VER                                                     Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)

    May  3 2005 23:18:38

    Copyright (c) 1988-2003 Microsoft Corporation

    Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

10           OWNER_TERM                                                   owner

11           TABLE_TERM                                                   table

12           MAX_OWNER_NAME_LENGTH                                        128

13           TABLE_LENGTH                                                 128

14           MAX_QUAL_LENGTH                                              128

15           COLUMN_LENGTH                                                128

16           IDENTIFIER_CASE                                              MIXED

17           TX_ISOLATION                                                 2

18           COLLATION_SEQ                                                charset=cp936 collation=Chinese_PRC_CI_AS

19           SAVEPOINT_SUPPORT                                            Y

20           MULTI_RESULT_SETS                                            Y

22           ACCESSIBLE_TABLES                                            Y

100          USERID_LENGTH                                                128

101          QUALIFIER_TERM                                               database

102          NAMED_TRANSACTIONS                                           Y

103          SPROC_AS_LANGUAGE                                            Y

104          ACCESSIBLE_SPROC                                             Y

105          MAX_INDEX_COLS                                               16

106          RENAME_TABLE                                                 Y

107          RENAME_COLUMN                                                Y

108          DROP_COLUMN                                                  Y

109          INCREASE_COLUMN_LENGTH                                       Y

110          DDL_IN_TRANSACTION                                           Y

111          DESCENDING_INDEXES                                           Y

112          SP_RENAME                                                    Y

113          REMOTE_SPROC                                                 Y

500          SYS_SPROC_VERSION                                            8.00.2020

(所影响的行数为 29 行)

从上面的结果可以看出,sp_server_info这个SQL Server自带的存储过程可以查看到服务器操作系统版本信息、数据库名称信息、版本信息、编码信息、校验规则信息等等。

关于sp_server_info存储过程查看SQL Server数据库服务器信息,本文就介绍这么多,希望对您有所帮助,谢谢!

03-14 08:48