日期:2014-05-16  浏览次数:21108 次

sql server 2005打开数据表提示"目录名无效"

点击“详细信息”内容如下:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.IO.IOException: 目录名无效。

   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.__Error.WinIOError()
   在 System.IO.Path.GetTempFileName()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NewQueryMenuHandler.Invoke()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)
   在 System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   在 System.Windows.Forms.MenuItem.MenuItemData.Execute()
   在 System.Windows.Forms.Command.Invoke()
   在 System.Windows.Forms.Command.DispatchID(Int32 id)
   在 System.Windows.Forms.Control.WmCommand(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.TreeView.WndProc(Message& m)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LazyTreeView.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
AppIDPackage
    程序集版本: 9.0.242.0
    Win32 版本: 9.00.1399.00
    基本代码: file:///D:/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/AppIDPackage.DLL
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如: 

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。

------解决方案--------------------
试试这个:

在查询分析器中输入查询语句,点ctrol+l后,下面会提示类似如下信息:
Microsoft.SqlServer.Management.SqlMgmt.ShowPlan.XmlPlanNodeBuilder”的类型初始值设定项引发异常。
未能找到路径“C:\Documents and Settings\Administrator\Local Settings\Temp\1\zhemge.tmp”的一部分。
在上面目录Temp中建立1文件夹就可以了。