代码改变世界

吉特日化MES & SQL Server 无法执行数据库脚本

2021-05-19 10:21  贺臣  阅读(386)  评论(0编辑  收藏  举报

  打开服务器打算远程执行一下脚本,突发发现数据库无法执行脚本,就想着是不是安装了 海康AGV 控制系统的问题导致,问题如下:

  问题截图如下:

  

 

   

  报错信息如下:

===================================

未能找到路径“C:\Users\Administrator\AppData\Local\Temp\2\Script_637570159644523753.sql”的一部分。 (mscorlib)

------------------------------
程序位置:

   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   在 System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   在 System.IO.StreamWriter..ctor(String path, Boolean append)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptFile(String contents, String scriptType)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)

 

   解决方式如下:

   1. 进入到此目录下面  C:\Users\Administrator\AppData\Local\Temp\

   2. 在改目录下新增 1, 2 两个文件夹

  

 

 

  然后重新执行脚本即可


作者:情缘
出处:http://www.cnblogs.com/qingyuan/
关于作者:从事仓库,生产软件方面的开发,在项目管理以及企业经营方面寻求发展之路
版权声明:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接。
联系方式: 个人QQ  821865130 ; 仓储技术QQ群 88718955,142050808 ;
吉特仓储管理系统 开源地址: https://github.com/hechenqingyuan/gitwms