zdc253212956 发表于 2016-11-1 08:13:57

SQL Server 调用本地的*.sql文件

osql -S pc-bdk -U sa -P sa123 -i d:\1.sql -d

  
  
  请注意大小写
  
  

use master
execmaster.dbo.sp_configure 'xp_cmdshell', 1
reconfigure
exec sp_configure 'show advanced options', 1
reconfigure
exec   master.dbo.xp_cmdshell   'osql -S pc-bdk -U sa -P sa123 -i d:\1.sql -d'   
  
  
页: [1]
查看完整版本: SQL Server 调用本地的*.sql文件