国产老熟女高潮毛片A片仙踪林,欧美喂奶吃大乳,狠狠爱无码一区二区三区,女神的私人医生动漫免费阅读

新聞建站cms系統(tǒng)、政府cms系統(tǒng)定制開發(fā)

廣州網(wǎng)站建設(shè)公司-閱速公司

asp.net新聞發(fā)布系統(tǒng)、報(bào)紙數(shù)字報(bào)系統(tǒng)方案
/
http://www.tjsimaide.com/
廣州網(wǎng)站建設(shè)公司
您當(dāng)前位置:首頁>sqlserver數(shù)據(jù)庫

sqlserver數(shù)據(jù)庫

sqlserver 2016導(dǎo)出excel表數(shù)據(jù),sqlserver數(shù)據(jù)庫中表導(dǎo)出為單個(gè)excel文件

發(fā)布時(shí)間:2024/12/7 21:38:10  作者:Admin  閱讀:19  

廣告:

sp_configure 'allow updates',0 RECONFIGURE WITH override
RECONFIGURE;
go

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;

go 

DECLARE @dbname sysname
SET @dbname = 'CzJxc2008'

DECLARE @sql NVARCHAR(MAX)
DECLARE @table NVARCHAR(256)
DECLARE cur CURSOR FOR
SELECT name FROM sys.tables WHERE type = 'U' AND name NOT LIKE 'sp%' --表

---SELECT name FROM sys.views WHERE name NOT LIKE 'sp%' --視圖 --視圖
OPEN cur

FETCH NEXT FROM cur INTO @table
WHILE @@FETCH_STATUS = 0
BEGIN
SET @sql = '
DECLARE @cmd NVARCHAR(2000)
SET @cmd = ''bcp "' + @dbname + '.dbo.' + @table + '" out "G:\temp\20241207\excel\' + @table + '.xls" -c -q -S".\sql2016" -U"sa" -P"hao123"''
EXEC master..xp_cmdshell @cmd'

EXEC sp_executesql @sql

FETCH NEXT FROM cur INTO @table
END

CLOSE cur
DEALLOCATE cur

--@dbname
--YourServerName" -U"YourUsername" -P"YourPassword"'
--path

SQL Server 阻止了對組件 'xp_cmdshell' 的 過程 'sys.xp_cmdshell' 的訪問,因?yàn)榇私M件已作為此服務(wù)器安全配置的一部分而被關(guān)閉。系統(tǒng)管理員可以通過使用 sp_configure 啟用 'xp_cmdshell'。有關(guān)啟用 'xp_cmdshell' 的詳細(xì)信息,請參閱 SQL Server 聯(lián)機(jī)叢書中的 "外圍應(yīng)用配置器"。

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;


SQLState = 37000, NativeError = 2812
Error = [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]找不到存儲過程 'sp_describe_first_result_set'。
NULL

升級到 sqlserver 2016

Error = [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]對象名 'CzJxc2008.dbo.MSreplication_options' 無效。

數(shù)據(jù)庫選項(xiàng)改為 sqlserver 2016

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC Driver 13 for SQL Server]Unable to open BCP host data-file

路徑不對(檢查excel路徑目錄是否存在)

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC Driver 13 for SQL Server]Warning: BCP import with a format file will convert empty strings in delimited columns to NULL.

警告:使用格式化文件的BCP導(dǎo)入會將分隔列中的空字符串轉(zhuǎn)換為NULL。

廣告:

相關(guān)文章
導(dǎo)出excel表數(shù)據(jù)
cms新聞系統(tǒng)購買咨詢
掃描關(guān)注 廣州閱速軟件科技有限公司
掃描關(guān)注 廣州閱速科技
主站蜘蛛池模板: 德格县| 新巴尔虎右旗| 无锡市| 米泉市| 六安市| 铜川市| 棋牌| 安化县| 韶关市| 宜宾市| 永德县| 阳原县| 寻甸| 永新县| 兴宁市| 深泽县| 托里县| 湘乡市| 鹿邑县| 全椒县| 大方县| 二连浩特市| 雅安市| 临猗县| 麻江县| 闵行区| 肃宁县| 杭锦后旗| 新晃| 南城县| 东丽区| 囊谦县| 都安| 德州市| 清河县| 嘉善县| 青川县| 介休市| 大田县| 古丈县| 高安市|