当前位置:Gxlcms > 数据库问题 > 数据库xp_cmdshell使用

数据库xp_cmdshell使用

时间:2021-07-01 10:21:17 帮助过:19人阅读

show advanced options,1 reconfigure go sp_configure xp_cmdshell,1 reconfigure go

删除本地文件,注意是删除数据库所在的服务器的本地文件。

exec master.dbo.xp_cmdshell del F:\123.txt

将txt文件数据导入数据库,注意保证文件存在,并保证表存在。

BULK INSERT Tb_Login
FROM F:\csv.txt
WITH(
    FIELDTERMINATOR = ,,
    ROWTERMINATOR = \n
)

 将数据导出为csv文件。

EXEC master..xp_cmdshell BCP TestOne..Tb_Login OUT F:\entryId.csv -c -t -T

 

数据库xp_cmdshell使用

标签:mina   field   导入   min   font   out   configure   log   style   

人气教程排行