成人性生交大片免费看视频r_亚洲综合极品香蕉久久网_在线视频免费观看一区_亚洲精品亚洲人成人网在线播放_国产精品毛片av_久久久久国产精品www_亚洲国产一区二区三区在线播_日韩一区二区三区四区区区_亚洲精品国产无套在线观_国产免费www

主頁(yè) > 知識(shí)庫(kù) > 一些SQL Server存儲(chǔ)過(guò)程參數(shù)及例子

一些SQL Server存儲(chǔ)過(guò)程參數(shù)及例子

熱門標(biāo)簽:福州外呼系統(tǒng)招商 AI智能云呼電話機(jī)器人怎么注冊(cè) 溫州語(yǔ)音外呼系統(tǒng)排名 商家地圖標(biāo)注圖片 怎么在高德地圖標(biāo)注多個(gè)點(diǎn) 四川穩(wěn)定外呼系統(tǒng)公司 百度地圖標(biāo)注信息怎么修改 沈陽(yáng)外呼系統(tǒng)有效果嗎 電話機(jī)器人接口是什么樣的

Microsoft included several hundred stored procedures in the various versions of Microsoft SQL Server and it has documented a good percentage of them. But many stored procedures remain undocumented. Some are used within the Enterprise Manager GUI in SQL 2000 and were not intended to be used by other processes. Microsoft has slated some of these stored procedures to be removed (or they have been removed) from future versions of SQL Server. While these stored procedures can be very useful and save you lots of time, they can be changed at any time in their function or they can simply be removed.

The chart below shows that while many of the procedures have been carried through from one version of Microsoft SQL Server to another, new stored procedures have been introduced, and some have been removed from the install package. Most, if not all, of the procedures require the user to be a member of the sysadmin fixed server role in order to execute the procedures. The stored procedures that interact with the file system also require that the user executing the procedure (as well as SQL Server's service account) have access to the file/folder.

Procedure Name SQL 2000 SQL 2005 SQL 2008
sp_executeresultset X    
sp_MSforeachdb X X X
sp_MSforeachtable X X X
sp_readerrorlog X X X
xp_create_subdir   X X
Xp_delete_file   X X
xp_dirtree X X X
xp_fileexist X X X
xp_fixeddrives X X X
xp_getfiledetails X    
xp_getnetname X X X
xp_loginconfig X X X
xp_makecab X    
xp_msver X X X
xp_get_mapi_profiles X X X
xp_subdirs X X X
xp_test_mapi_profile X X X
xp_unpackcab X    

sp_executeresultset

Microsoft removed this handy little procedure called sp_executeresultset from SQL Server in SQL Server 2005. It allows you to generate dynamic SQL code on the fly by using a SELECT query. Then, the resulting SQL commands will be executed against the database. It permits you to create a single piece of code that can, in a single step, find the number of records in every table in your database (as the example shows). This is an undocumented stored procedure and there is no way of knowing why it was removed. But, alas, this handy utility is gone.

exec sp_execresultset 'SELECT ''SELECT '''''' + name + '''''',
count(*) FROM '' + name
from sysobjects
where xtype = ''U'''

sp_MSforeachdb / sp_MSforeachtable

Two procedures, sp_MSforeachdb and sp_MSforeachtable, are wrappers around a cursor. They allow you to execute T-SQL code against each database on your SQL Server and each table within the current database, respectively. You cannot, however, use an sp_MSforeachtable command within an sp_MSforeachdb command in SQL 2000 and prior. The cursor name that was used within those procedures was the same (hCForEach) and would therefore return an error saying that the cursor name was already in use for each execution of the sp_MSforeachtable. In SQL Server 2005, Microsoft resolved this issue. In order to "next" the command, you must tell one of the procedures it will be using a different replacement character other than the default question mark. I change the replacement character in the database command because it's easier.

Print each table name in the current database.

exec sp_MSforeachtable 'print ''?'''

Print each database on the current server.

exec sp_MSforeachdb 'print ''?'''

Print each table on the current server.

exec sp_MSforeachdb 'use [@] exec sp_MSforeachtable ''print
''''@.?''''''', '@'

sp_readerrorlog / xp_readerrorlog

The stored procedure sp_readerrorlog actually comes in two forms. Each works the same; one is simply a wrapper for the second. The wrapper stored procedure is sp_readerrorlog and it calls xp_readerrorlog. Both have four input parameters, but only the first two are useful to us. The first parameter establishes the file number that you wish to view. The second is the log to view (1 or null for ERRORLOG, 2 for SQL Agent Log). This allows you to view your error logs quickly and easily instead of having to look at the bloated log viewer that now comes with SQL Server 2005 and SQL 2008.

View the current SQL ERRORLOG file.

exec sp_readerrorlog

exec sp_readerrorlog 0, 1

View the Prior SQL Agent Log file.

exec sp_readerrorlog 1, 2

xp_create_subdir

Introduced in SQL Server 2005, the xp_create_subdir stored procedure is very handy because you can use it to create folders on SQL Server's hard drive or on a network share from within T-SQL.

exec xp_create_subdir 'c:\MSSQL\Data'

xp_delete_file

Use the xp_delete_file stored procedure introduced in SQL Server 2005 to delete files from SQL Server's hard drive or a network share from within T-SQL.

xp_dirtree

The xp_dirtree procedure allows you to view the folder tree and/or file list beneath a folder. This procedure has several parameters that control how deep the procedure searches and whether it returns files and folders or folders only. The first parameter establishes the folder to look in. (Recommendation: Do not run this procedure against the root of the drive that Windows is installed on because it will take some time to generate the tree and return the data.) The second parameter limits the number of recursive levels that the procedure will dig through. The default is zero or all levels. The third parameter tells the procedure to include files. The default is zero or folders only, a value of 1 includes files in the result set. Specifying a third value not equal to zero will add an additional column to the output called file which is a bit field showing the entry in a folder or file.

Get the full directory tree.

exec xp_dirtree 'd:\mssql\'

Get the first two levels of the directory tree.

exec xp_dirtree 'd:\mssql', 2

Get the first three levels of the directory tree, including files.

exec xp_dirtree 'd:\mssql\', 3, 1

xp_fileexist

This SQL Server stored procedure, xp_fileexist, is used to determine if a file exists on SQL Server's hard drive or on a network share. It is extremely useful in stored procedures that load data from flat files. It allows you to check and see if the file exists before attempting to blindly load the file. The procedure has two parameters. Use the first parameter to determine if the file or folder you want exists. The second is an output parameter, which when specified, returns a 1 or 0 if the file exists or does not.

Without the parameter.

exec xp_fileexist 'c:\importfile.csv'

With the parameter.

DECLARE @file_exists int
exec xp_fileexist 'c:\importfile.csv', @file_exists OUTPUT
SELECT @file_exists
 

xp_fixeddrives

The procedure xp_fixeddrives is one of the most useful procedures. It presents a list of all drive letters and the amount of free space each drive has. The parameter has a single optional input parameter that can filter the results by drive type. A value of 3 will return all mass storage devices (CD-ROM, DVD, etc.); a value of 4 will return the hard drives; while a value of 2 will return removable media (USB thumb drives, flash drives, etc.).

Return all drives.

exec xp_fixeddrives

Return hard drives only.

exec xp_fixeddrives 2

xp_getfiledetails

The procedure xp_getfiledetails is another extremely useful procedure, which was last available in SQL Server 2000. This procedure returns size, date and attribute information about the file specified, including date and times created, accessed and modified.

exec xp_getfiledetails 'c:\filetoload.csv'

xp_getnetname

The procedure xp_getnetname returns the name of the physical machine where Microsoft SQL Server is installed. You can have the machine name returned as a record set or as a variable.

Without the parameter.

exec xp_getnetname

Using the parameter.

DECLARE @machinename sysname
exec xp_getnetname @machinename OUTPUT
select @machinename
 

xp_loginconfig

This SQL Server stored procedure will tell you some basic authentication information about the user executing it. It tells you the authentication method (Windows versus SQL Login), the default domain of the server, the audit level, as well as some internal separator information.

exec xp_loginconfig

xp_makecab

Back in SQL Server 2000, Microsoft gave us the ability to compress OS files directly from T-SQL without having to shell out to DOS via xp_cmdshell and run third-party software, like pkzip or winzip. That command was xp_makecab. It allows you to specify a list of files you want to compress as well as the cab file you want to put them in. It even lets you select default compression, MSZIP compression (akin to the .zip file format) or no compression. The first parameter gives the path to the cab file in which you want to create or add files to. The second parameter is the compression level. The third parameter applies if you want to use verbose logging. Starting with the fourth parameter and on down are the names of the files you want to compress. In my testing, I was able to pass 45 file names to be compressed to the extended stored procedure, which means that it is a very flexible solution to your data compression requirements.

exec xp_makecab 'c:\test.cab', 'mszip', 1, 'c:\test.txt' , 'c:\test1.txt'

xp_msver

The procedure xp_msver is very useful when looking for system information. It returns a wealth of information about the host operating system -- the SQL version number, language, CPU type, copyright and trademark information, Microsoft Windows version, CPU count and affinity settings, physical memory settings and your product key. This procedure has many input parameters that allow you to filter down the records that are returned. Each parameter is a sysname data type, which accepts the name of one of the records. If any parameters are specified, only the rows specified as a parameter are returned.

No filter specified.

exec xp_msver

Return only Platform and Comments records.

exec xp_msver 'Platform', 'Comments'

xp_get_mapi_profiles

The xp_get_mapi_profiles procedure assists you in configuring SQL Mail. When executed, it will call to Windows via the SQL Mail component of SQL Server and display a list of available MAPI profiles that are configured in Outlook and it specifies which profile is the default profile. If it doesn't display any records, then either Outlook is not configured correctly or SQL Server is not running under a domain account with Outlook profiles configured. In order to use this procedure in SQL Server 2005 or SQL Server 2008, you must enable the "SQL Mail XPs" option in the Surface Area Configuration tool or within the sp_configure procedure.

exec xp_get_mapi_profiles

xp_subdirs

The xp_subdirs procedure displays a subset of the information avaialble through xp_dirtree. Xp_subdirs will display all the subfolders in a given folder. It can be very handy when you are building a directory tree within a table dynamically and you do not want to worry about the extra parameters of the xp_dirtree procedure.

exec xp_subdirs 'd:\mssql'

xp_test_mapi_profiles

The procedure xp_test_mapi_profiles is another undocumented stored procedure that is very useful when you are setting up SQL Mail. It will start, then stop, a MAPI session to ensure that MAPI is configured correctly and working within the confines of Microsoft SQL Server. I should note that it does not verify the mail server configuration within the MAPI client (Outlook) nor does it send a test message.

The procedure accepts a single input parameter. That parameter is the name of the MAPI profile you wish to test. Like the xp_get_mapi_profiles procedure, for this stored procedure to function in SQL Server 2005 and SQL Server 2008, you must enable the "SQL Mail XPs" option in the Surface Area Configuration tool or within the sp_configure procedure.

When working with the SQL Mail stored procedures, be aware that SQL Mail is still slated for removal from the Microsoft SQL Server platform. That means the procedures sp_get_mapi_profiles and xp_test_mapi_profiles are slated for removal, as they are part of the SQL Mail subsystem. You should do all mail work on SQL Server 2005 and later using Database Mail instead of SQL Mail to ensure code portability with future versions of SQL Server. Microsoft initially slated SQL Mail for removal in SQL Server 2008, however, based on its inclusion in the current beta release, its future in SQL Server 2008 is unknown.

xp_unpackcab

Along with the xp_makecab procedure comes the xp_unpackcab extended stored procedure, and it does just what it says: It extracts files from cab files. The first paramater is the cab file, the second is the path you want to extract to and the third is verbose logging. A fourth paramater lets you specify the "extract to" file name.

exec xp_unpackcab 'c:\test.cab', 'c:\temp', 1

While this is not intended to be a complete list of the undocumented stored procedures in SQL Server, it does provide a reference point for many of these procedures with the hope of making the lives of the SQL Server administrators easier. Remember, you should never count on these procedures surviving from one SQL Server version to the next, nor should you expect their code base to remain the same between versions. That said, go code and enjoy.

All information provided about Microsoft SQL Server 2008 (Katmai) is based on beta edition 10.0.1019 of the software and is subject to change without notice.

您可能感興趣的文章:
  • sqlserver存儲(chǔ)過(guò)程中SELECT 與 SET 對(duì)變量賦值的區(qū)別
  • SQL Server 2008 存儲(chǔ)過(guò)程示例
  • 如何在SQL Server 2008下輕松調(diào)試T-SQL語(yǔ)句和存儲(chǔ)過(guò)程
  • SqlServer獲取存儲(chǔ)過(guò)程返回值的實(shí)例
  • sqlserver 存儲(chǔ)過(guò)程中If Else的用法實(shí)例
  • sqlserver中查找所有包含了某個(gè)文本的存儲(chǔ)過(guò)程
  • Sql Server中存儲(chǔ)過(guò)程中輸入和輸出參數(shù)(簡(jiǎn)單實(shí)例 一看就懂)
  • sqlserver 各種判斷是否存在(表名、函數(shù)、存儲(chǔ)過(guò)程等)
  • SQL Server 分頁(yè)查詢存儲(chǔ)過(guò)程代碼
  • SQL Server存儲(chǔ)過(guò)程同時(shí)返回分頁(yè)結(jié)果集和總數(shù)

標(biāo)簽:無(wú)錫 寶雞 邯鄲 西寧 汕尾 七臺(tái)河 來(lái)賓 營(yíng)口

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《一些SQL Server存儲(chǔ)過(guò)程參數(shù)及例子》,本文關(guān)鍵詞  一些,SQL,Server,存儲(chǔ),過(guò)程,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《一些SQL Server存儲(chǔ)過(guò)程參數(shù)及例子》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于一些SQL Server存儲(chǔ)過(guò)程參數(shù)及例子的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    成人在线视频www| 无人视频在线观看免费| 91免费观看视频在线| 欧美一级免费| 国产精品久久久久久久久图文区| 精品无人区卡一卡二卡三乱码免费卡| 神马午夜伦理影院| 亚洲色图五月天| 国产91富婆露脸刺激对白| 国产青草视频在线观看视频| 日韩av在线中文字幕| 日产精品久久久一区二区福利| 日日噜噜夜夜狠狠久久波多野| 成人国产一区二区| 久久人人97超碰国产公开结果| 性欧美18一19sex性欧美| 天堂在线视频观看| 国产女精品视频网站免费| 国产精品老女人精品视频| 一区三区在线欧| 日本猛少妇色xxxxx免费网站| 免费无码国产v片在线观看| 乱人伦xxxx国语对白| 乡村艳史在线观看| 黄网址在线播放免费| 青青草精品视频在线观看| 2020国内自拍视频| 欧美国产91| 欧美高清3dfreexxxx性| 中文字幕在线看视频国产欧美| 一本一本久久a久久综合精品| 亚洲人永久免费| 五月天综合网| 99久久99久久精品国产片桃花| 99久久久国产精品免费调教网站| 成av人片在线观看www| 青娱乐极品盛宴一区二区| 国产成人av电影免费在线观看| 91日韩视频| 精品久久久久久综合日本欧美| 国产精品进线69影院| 国产98色在线|日韩| 在线观看中文字幕的网站| 亚洲一区在线免费观看| 日日摸夜夜夜夜夜添| 不卡在线一区二区| 2021天堂中文幕一二区在线观| 色网站免费在线观看| 草草草视频在线观看| h视频免费观看| 天天操夜夜操天天射| 视频一区视频二区中文字幕| 国产精品久久久久久久美男| 精品美女在线播放| 99re国产在线播放| 日本中文字幕一区| 综合免费一区二区三区| 国产欧美一区二区精品性色超碰| 99久久久国产精品美女| 国产精品无码专区| 四虎海外影库www4hu| 熟妇无码乱子成人精品| av午夜精品一区二区三区| 欧美一级片免费观看| 日韩精品福利片午夜免费观看| 精品欧美一区二区三区免费观看| 欧美精品乱人伦久久久久久| 亚洲网站在线看| www精品美女久久久tv| 国产伦精品一区二区三区视频青涩| 欧洲一区在线| 在线视频欧美日韩精品| 杨幂一区欧美专区| 四虎影视2018在线播放alocalhost| 亚洲美女精品久久| 欧美熟妇精品黑人巨大一二三区| 97人人在线视频| 欧美在线免费观看视频| 亚洲欧美激情一区| 美女翘臀白浆直流视频| 久久久久久久久久久久久91| 一二三四国产精品| 成人综合网网址| av在线亚洲色图| 亚洲欧洲黄色网| 国产在线一区二区| 日韩欧美一级在线播放| 色综合久久中文字幕综合网小说| 国产在线不卡精品| yellow91字幕网在线| 欧美高清一级片| 亚洲第一区中文99精品| 中文字幕在线国产精品| 久草在.com| 97人摸人人澡人人人超一碰| 中国女人内谢25xxxx免费视频| 色一情一乱一乱一区91| 又黄又爽又色视频| 一区二区三区精品在线| 情事1991在线| 99热这里只有精| 亚洲精彩视频| 国产精品一区二区免费视频| 日韩人妻无码精品久久久不卡| 亚洲男帅同性gay1069| a中文在线播放| 国产精品偷拍| 先锋影音日韩| 亚洲成人三区| 熟女俱乐部一区二区视频在线| 国产视频一二三区| 开心激情五月网| 国产精品久久久久aaaa樱花| 国产欧美亚洲精品a| 亚洲欧美自偷自拍另类| 成人免费视频国产| 欧美激情一级片一区二区| 国产精品99久久久久久白浆小说| 日本一区二区高清不卡| 激情五月综合婷婷| 中文在线a天堂| 国产亚洲精品美女久久久久久久久久| 国产偷激情在线| 视频一区欧美精品| 婷婷精品久久久久久久久久不卡| 人妻 日韩 欧美 综合 制服| 国内精品400部情侣激情| 麻豆av一区二区三区| 亚洲精品成人悠悠色影视| 国产精品欧美一区二区三区| 亚洲国产欧美一区二区三区久久| 奇米精品一区二区三区四区| 国产黄频在线观看| 久久久国产精品一区二区三区| 精品一区二区三区视频日产| 欧美日产国产成人免费图片| 亚洲av无码一区二区三区网址| 国产精品白浆视频免费观看| 日韩精品最新网址| 丁香激情综合国产| 国产欧美一区二区三区另类精品| k8久久久一区二区三区| 久久影院视频免费| 国产成人高清激情视频在线观看| 久久影院中文字幕| 欧美大肥婆大肥bbbbb| 色综合天天性综合| 久久国产这里只有精品| 蜜桃视频一区二区| 免费a级毛片永久免费| 一本久道高清无码视频| 国产原创av在线| 日本视频网站在线观看| 色综合天天爱| 国产专区视频| 91豆麻精品91久久久久久| 国产永久免费| 99久久夜色精品国产亚洲狼| 国产mv日韩mv欧美| 黑人巨大精品欧美一区二区桃花岛| 一区二区免费在线观看视频| 老司机精品福利在线观看| 亚洲天堂手机| 精品久久久久久中文字幕大豆网| 亚洲另类在线制服丝袜| 久久久久久欧美精品se一二三四| 久久成人精品电影| 国产精品第72页| 韩国在线视频一区| 国产这里有精品| 9久久婷婷国产综合精品性色| 久热精品视频在线| 神马日本精品| 小小影院久久| 国产精品久久久久久影院8一贰佰| 男裸体无遮挡网站| a天堂视频在线| 精品久久久久99| 女同毛片一区二区三区| 五月天亚洲精品| 国产精品久久久久久久久免费丝袜| 成人中文字幕视频| 国产极品久久久久久久久波多结野| 精品无码av无码免费专区| 国产精品yjizz视频网| 日韩精品一区二区三区蜜臀| 国产精品日本一区二区三区在线| 欧美极品美女视频网站在线观看免费| 日韩av免费在线播放| 亚洲人视频在线| 91九色国产社区在线观看| 看黄网站在线观看| а天堂8中文最新版在线官网| av官网在线观看| 久久久人成影片免费观看| 手机在线观看你懂的| 国产videos| 久久影院免费观看| 中文字幕一区二区三区中文字幕| 大香伊人久久精品一区二区| 懂色av一区二区三区免费观看| 国精产品一品二品国精品69xx| 成人在线电影网| 欧美日韩亚洲国产| 亚洲精品久久久久久久久久久久久| 成久久久网站| 无码国产精品久久一区免费| 欧美精品久久久久久久久老牛影院| 精品不卡一区二区三区| 国产婷婷色综合av蜜臀av| 九九免费精品视频| 成人在线观看免费视频| 国产美女精品写真福利视频| 久久机热这里只有精品| 国产精品无码一区二区三区免费| 国产精品88av| 亚洲国产成人私人影院| 国产 日韩 欧美大片| 国产精品无码2021在线观看| 黄片毛片在线看| 台湾佬综合网| 成人淫片免费视频95视频| 可以免费看污视频的网站| 免费看成人av| 欧美欧美欧美| 综合成人在线| 22288色视频在线观看| 99riav久久精品riav| 82av视频| 羞羞小视频在线观看| 久久国产88| 国产精品4hu.www| 国产一级aa大片毛片| 国产美女性感在线观看懂色av| 精品成人一区二区三区四区| 亚洲欧美综合自拍| 中文字幕视频网站| 中文字幕亚洲影视| 亚洲激情一二三区| www..69.hd| 成人激情综合网| 在线观看日韩av先锋影音电影院| 亚洲天天做日日做天天谢日日欢| 一区二区三区影视| 老师让我她我爽了好久视频| 成+人+亚洲+综合天堂| 国产乱子伦一区二区三区国色天香| 在线一区二区三区视频| 欧美猛男gaygay网站| 中文字幕丰满孑伦无码专区| 久久激情五月激情| 中文网丁香综合网| 亚洲精品午夜久久久久久久| 麻豆一区二区麻豆免费观看| 在线观看免费黄网站| 国产乱淫av片| 国产对白在线| 五月婷婷六月综合| 福利欧美精品在线| 日韩精品欧美一区二区三区| 国产在线视频91| 亚洲欧美制服综合另类| 日韩大片一区二区| jlzzjlzz国产精品久久| 短视频在线观看| 国产激情在线免费观看| 欧美三级日本三级| 伊人成综合网伊人222| 国产精品电影一区二区| 蜜桃专区在线| 中文字幕一区二区三中文字幕| 亚洲一级在线观看| 99精品视频在线观看| 男人日女人逼逼| 日韩av免费大片| 51久久精品夜色国产麻豆| 亚洲国产另类 国产精品国产免费| 国产91丝袜在线观看| 国产精品超碰97尤物18| 国产精品zjzjzj在线观看| 日韩精品成人在线观看| 成人一级视频在线观看| 激情亚洲一区二区三区四区| 久久久不卡网国产精品一区| 午夜av免费观看| 国产毛片一区二区三区| 久久91在线| 日本一区二区黄色| 青青草原国产在线观看| 精品美女久久| 无码人妻精品一区二区三区不卡| 欧美三级午夜理伦| 香蕉久久一区二区不卡无毒影院| 日韩大片在线永久免费观看网站| 欧美一区二区三区免费看| 久久免费偷拍视频| 久久噜噜色综合一区二区| 国产精品毛片久久久久久久| 国产清纯在线一区二区www| 欧美大片大片在线播放| 免费资源在线观看| 91精品国产成人www| 国产欧美日韩视频| 久久午夜精品视频| 9l亚洲国产成人精品一区二三| 国产精品久久一区二区三区| 国产99久久精品一区二区永久免费| 肉体视频在线| 日韩精品久久| 中文字幕免费在线| 成人福利视频导航| 五月天综合在线| 久久99精品国产99久久6尤物| 欧美一级日韩不卡播放免费| 小泽玛利亚一区二区三区视频| 欧美人与牛zoz0性行为| 超碰免费在线观看| 久久久91精品国产一区不卡| 久久99热精品这里久久精品| 黄色免费看网站| 亚洲在线偷拍自拍| 免费看美女毛片| 色婷婷久久av| 亚洲精品中文字幕av| 亚洲午夜未满十八勿入免费观看全集| 第四色成人网| 天天插天天射| 日本韩国在线视频爽|