日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

SQL Server2000 未公开的存储过程

發(fā)布時(shí)間:2025/3/15 数据库 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SQL Server2000 未公开的存储过程 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

SQL Server2000 未公開(kāi)的存儲(chǔ)過(guò)程

?

sp_columns_rowset
The sp_columns_rowset stored procedure returns the complete columns description, including the length, type, name, and so on.

Syntax

sp_columns_rowset table_name [, table_schema ] [, column_name]

where

table_name?? - is the table name. table_name is sysname.
table_schema - is the table schema. table_schema is sysname,
?????????????? with a default of NULL.
column_name? - is the column name. column_name is sysname,
?????????????? with a default of NULL.

?


This is the example:

USE pubs
GO
EXEC sp_columns_rowset 'authors'
GO

?


sp_fixindex
The sp_fixindex stored procedure can be used to fix corruption in a system table by recreating the index.

Syntax

sp_fixindex dbname, tabname, indid

where

dbname? - is the database name. dbname is sysname.
tabname - is the system table name. tabname is sysname.
indid?? - is the index id value. indid is int

?


Note. Before using this stored procedure the database has to be in single user mode.

See this link for more information:
How can I fix a corruption in a system table?

This is the example:

USE pubs
GO
EXEC sp_fixindex pubs, sysindexes, 2
GO

?


sp_MSforeachdb
Sometimes, you need to perform the same actions for all databases. You can create cursor for this purpose, or you can also use the sp_MSforeachdb stored procedure to accomplish the same goal with less work.

For example, you can use the sp_MSforeachdb stored procedure to run a CHECKDB for all the databases on your server:

EXEC sp_MSforeachdb @command1="print '?' DBCC CHECKDB ('?')"


sp_MSforeachtable
Sometimes, you need to perform the same actions for all tables in the database. You can create cursor for this purpose, or you can also use the sp_MSforeachtable stored procedure to accomplish the same goal with less work.

For example, you can use the sp_MSforeachtable stored procedure to rebuild all the indexes in a database:

EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"


sp_MShelpcolumns
The sp_MShelpcolumns stored procedure returns the complete schema for a table, including the length, type, name, and whether a column is computed.

Syntax

sp_MShelpcolumns tablename [, flags] [, orderby] [, flags2]

where

tablename - is the table name. tablename is nvarchar(517).
flags???? - flags is int, with a default of 0.
orderby?? - orderby is nvarchar(10), with a default of NULL.
flags???? - flags2 is int, with a default of 0.

?


To get the full columns description for the authors table in the pubs database, run:

USE pubs
GO
EXEC sp_MShelpcolumns 'authors'
GO

?


sp_MShelpindex
The sp_MShelpindex stored procedure returns information about name, status, fill factor, index columns names, and file groups for a given table.

Syntax

sp_MShelpindex tablename [, indexname] [, flags]

where

tablename - is the table name. tablename is nvarchar(517).
indexname - is the index name. indexname is nvarchar(258),
??????????? with a default of NULL.
flags???? - flags is int, with a default of NULL.

?


To get the indexes description for the authors table in the pubs database, run:

USE pubs
GO
EXEC sp_MShelpindex 'authors'
GO

?


sp_MShelptype
The sp_MShelptype stored procedure returns much useful information about system data types and user data types.

Syntax

sp_MShelptype [typename] [, flags]

where

typename - is the type name. typename is nvarchar(517),
?????????? with a default of NULL.
flags??? - flags is nvarchar(10), with a default of NULL.

?


To get information about all built-in and user defined data types in the pubs database, run:

USE pubs
GO
EXEC sp_MShelptype
GO

?


sp_MSindexspace
The sp_MSindexspace stored procedure returns the size in kb, of the indexes found in a particular table.

Syntax

sp_MSindexspace tablename [, index_name]

where

tablename? - is the table name. tablename is nvarchar(517).
index_name - is the index name. index_name is nvarchar(258),
???????????? with a default of NULL.

?


To determine the space used by the indexes from the authors table in the pubs database, run:

USE pubs
GO
EXEC sp_MSindexspace 'authors'
GO

?


sp_MSkilldb
The sp_MSkilldb stored procedure sets a database to suspect mode and uses DBCC DBREPAIR to kill it. You should run this sp from the context of the master database. Use it very carefully.

Syntax

sp_MSkilldb dbname

where

dbname - is the database name. dbname is nvarchar(258).

?


To kill the pubs database, run:

USE master
GO
EXEC sp_MSkilldb 'pubs'
GO

?


sp_MStablespace
The sp_MStablespace stored procedure returns the number of rows in a table and the space the table and index use.

Syntax

sp_MStablespace name [, id]

where

name - is the table name. name is nvarchar(517).
id?? - id is int, with a default of NULL.

?


To determine the space used by the authors table in the pubs database, run:

USE pubs
GO
EXEC sp_MStablespace 'authors'
GO

?


Here is the result set from my machine:

Rows??????? DataSpaceUsed IndexSpaceUsed
----------- ------------- --------------
23????????? 8???????????? 32

?


sp_tempdbspace
The sp_tempdbspace stored procedure can be used to get the total size and the space used by the tempdb database. It is used without parameters.

Syntax

sp_tempdbspace

This is the example:

EXEC sp_tempdbspace

Here is the result set from my machine:

database_name database_size?????????? spaceused
------------- ----------------------- -----------------------------
tempdb??????? 9.750000??????????????? .562500

?


sp_who2
The sp_who2 stored procedure returns information about current SQL Server 2000 users and processes similar to sp_who, but it provides more detailed information. sp_who2 returns CPUTime, DiskIO, LastBatch and ProgramName in addition to the data provided by sp_who.

Syntax

sp_who [loginame]

where

loginame - the user's login name. If not specified, the procedure
?????????? reports on all active users of SQL Server.

?


This example returns information for the 'sa' login:

EXEC sp_who2 'sa'

sp_MSgetversion
This extended stored procedure can be used to get the current version of Microsoft SQL Server. To get the current SQL Server version, run

EXEC master..sp_MSgetversion

Note. A more common way to retrieve the current SQL Server version (this way provides more information) is to use following SELECT statement:

SELECT @@version


xp_dirtree
This extended stored procedure can be used to get a list of all the folders for the folder named in the xp. To get a list of all the folders in the C:/MSSQL7 folder, run:

EXEC master..xp_dirtree 'C:/MSSQL7'


xp_enum_oledb_providers
This extended stored procedure is used to list of all the available OLE DB providers. It returns Provider Name, Parse Name and Provider Description. To get a list of all OLE DB providers for your SQL Server, run:

EXEC master..xp_enum_oledb_providers


xp_enumcodepages
This extended stored procedure can be used to list of all code pages, character sets and their description for your SQL Server. To get a list of all code pages and character sets, run:

EXEC master..xp_enumcodepages


xp_enumdsn
This extended stored procedure returns a list of all System DSNs and their description. To get the list of System DSNs, run:

EXEC master..xp_enumdsn


xp_enumerrorlogs
This extended stored procedure returns the list of all error logs with their last change date. To get the list of error logs, run:

EXEC master..xp_enumerrorlogs


xp_enumgroups
This extended stored procedure returns the list of Windows NT groups and their description. To get the list of the Windows NT groups, run:

EXEC master..xp_enumgroups


xp_fileexist
You can use this extended stored procedure to determine whether a particular file exists on the disk or not.

Syntax:

EXECUTE xp_fileexist filename [, file_exists INT OUTPUT]

For example, to check whether the file boot.ini exists on disk c: or not, run:

EXEC master..xp_fileexist 'c:/boot.ini'


xp_fixeddrives
This very useful extended stored procedure returns the list of all hard drives and the amount of free space in Mb for each hard drive.

To see the list of drives, run:

EXEC master..xp_fixeddrives

xp_getnetname
This extended stored procedure returns the WINS name of the SQL Server that you're connected to.

To view the name, run:

EXEC master..xp_getnetname


xp_readerrorlog
This extended stored procedure returns the content of the errorlog file. You can find the errorlog file in the C:/MSSQL7/Log directory, by default for SQL Server 7.0.

To see the text of the errorlog file, run:

EXEC master..xp_readerrorlog


xp_regdeletekey
This extended stored procedure will delete an entire key from the registry. You should use it very carefully.

Syntax:

EXECUTE xp_regdeletekey [@rootkey=]'rootkey',
??????????????????????? [@key=]'key'

?


For example, to delete the key 'SOFTWARE/Test' from 'HKEY_LOCAL_MACHINE', run:

EXEC master..xp_regdeletekey
???? @rootkey='HKEY_LOCAL_MACHINE',?
???? @key='SOFTWARE/Test'

?


xp_regdeletevalue
This extended stored procedure will delete a particular value for a key in the registry. You should use it very carefully.

Syntax:

EXECUTE xp_regdeletevalue [@rootkey=]'rootkey',
????????????????????????? [@key=]'key',
????????????????????????? [@value_name=]'value_name'

?


For example, to delete the value 'TestValue' for the key 'SOFTWARE/Test' from 'HKEY_LOCAL_MACHINE', run:

EXEC master..xp_regdeletevalue
???? @rootkey='HKEY_LOCAL_MACHINE',
???? @key='SOFTWARE/Test',
???? @value_name='TestValue'

?


xp_regread
This extended stored procedure is used to read from the registry.

Syntax:

EXECUTE xp_regread [@rootkey=]'rootkey',
?????????????????? [@key=]'key'
?????????????????? [, [@value_name=]'value_name']
?????????????????? [, [@value=]@value OUTPUT]

?


For example, to read into the variable @test from the value 'TestValue' from the key 'SOFTWARE/Test' from the 'HKEY_LOCAL_MACHINE', run:

DECLARE @test varchar(20)
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE',
? @key='SOFTWARE/Test',
? @value_name='TestValue',
? @value=@test OUTPUT
SELECT @test

?


xp_regwrite
This extended stored procedure is used to write to the registry.

Syntax:

EXECUTE xp_regwrite [@rootkey=]'rootkey',
??????????????????? [@key=]'key',
??????????????????? [@value_name=]'value_name',
??????????????????? [@type=]'type',
??????????????????? [@value=]'value'

?


For example, to write the variable 'Test' to the 'TestValue' value, key 'SOFTWARE/Test', 'HKEY_LOCAL_MACHINE', run:

EXEC master..xp_regwrite
???? @rootkey='HKEY_LOCAL_MACHINE',
???? @key='SOFTWARE/Test',
???? @value_name='TestValue',
???? @type='REG_SZ',
???? @value='Test'

?


xp_subdirs
This extended stored procedure is used to get the list of folders for the folder named in the xp. In comparison with xp_dirtree, xp_subdirs returns only those directories whose depth = 1.

This is the example:

EXEC master..xp_subdirs 'C:/MSSQL7'

Note.Keep in mind that these undocumented extended stored procedures are not officially supported by Microsoft, and that they may not be found in the next version of SQL Server

總結(jié)

以上是生活随笔為你收集整理的SQL Server2000 未公开的存储过程的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 宅男噜噜噜66一区二区 | 日韩在线电影一区二区 | 午夜视频日韩 | 久久精品视频免费看 | 黄片毛片在线观看 | 国产免费不卡 | 日韩av第一页 | 在线亚洲一区二区 | 日韩精品tv | 中文字幕欧美日韩 | 亚洲精品一级片 | 午夜资源 | 国产精品一区在线看 | 在线看成人av | 玖玖五月| 伊人久久久久久久久久 | 国产精品1 | 涩涩视频网站 | 国产又白又嫩又爽又黄 | 亚洲精品久久久久久久蜜桃臀 | 福利91 | 国产伊人一区 | 中文字幕在线视频网站 | 久久久久久人妻一区二区三区 | 色综合欧美 | 欧美日一区二区三区 | 污视频免费在线观看网站 | 久久久久久网 | 可以免费看的黄色 | 久久青草热 | 自拍偷拍一区二区三区 | 免费观看高清在线 | 一级看片免费视频 | 四虎影视www在线播放 | 五月天婷婷激情视频 | 国产97色在线 | 国产 | 亚洲自拍偷拍网站 | 辟里啪啦国语版免费观看 | 午夜国产一区二区 | 亚洲欧美日韩另类在线 | 亚洲黄a | 黄色网址在线视频 | 少妇精品| 岛国av免费 | 成人欧美一区二区三区黑人孕妇 | 日本中文字幕在线观看 | 极品新婚夜少妇真紧 | 国产成人免费观看视频 | 国产精品xxx视频 | 在线播放黄色av | 日韩欧美国产高清91 | 91在线观看免费高清完整版在线观看 | 三级色视频 | 一道本久在线中文字幕 | 欧美成人小视频 | 毛片自拍 | 风韵多水的老熟妇 | 国产精品19乱码一区二区三区 | 东京热av一区 | 毛色毛片| 久久午夜激情 | 亚洲人一区二区三区 | 91久久中文字幕 | 亚洲黄色片子 | 亚洲精品一区二区三区蜜桃久 | 自拍偷拍欧美日韩 | 综合色婷婷一区二区亚洲欧美国产 | 日韩av在线播放网址 | 人人插人人草 | 曰本丰满熟妇xxxx性 | 操一操视频 | 黄色中文 | 国产激情综合五月久久 | 国产精彩视频在线 | 亚洲精品一区二区在线观看 | 亚洲精品国产99 | 国产又粗又猛又爽又黄的视频在线观看动漫 | 玖玖精品国产 | 中文字幕二区在线观看 | 中文字幕丝袜诱惑 | 在线激情网 | 成年人免费av| 亚洲 另类 春色 国产 | 一级做a爱视频 | 国产一区二区欧美 | 手机av中文字幕 | 视频1区2区 | 少妇高潮视频 | 天天爱夜夜操 | 永久免费的av网站 | 一级黄色性视频 | 亚洲啪啪| 免费a v网站 | 综合一区 | 亚洲精品色图 | 欧美一区二区福利 | 久久综合狠狠综合久久综合88 | 国产不卡一| 亚洲天天av|