在 sys.servers 中找不到服务器 'DB1'

 

Server Error in '/Engtek' Application.


在 sys.servers 中找不到服务器 'DB1'。请验证指定的服务器名称是否正确。如果需要,请执行存储过程 sp_addlinkedserver 以将服务器添加到 sys.servers。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 在 sys.servers 中找不到服务器 'DB1'。请验证指定的服务器名称是否正确。如果需要,请执行存储过程 sp_addlinkedserver 以将服务器添加到 sys.servers。

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[SqlException (0x80131904): 在 sys.servers 中找不到服务器 'DB1'。请验证指定的服务器名称是否正确。如果需要,请执行存储过程 sp_addlinkedserver 以将服务器添加到 sys.servers。]
        System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2022678
        System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5129040
        System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +214
        System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1100
        System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
        System.Data.SqlClient.SqlDataReader.get_MetaData() +86
        System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
        System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
        System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
        System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
        System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
        System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
        Insus.NET.Base.ExecuteProcedure(String procedureName, SqlDataReader& sqlDataReader, SqlParameter[] prams) +140
        [Exception: 在 sys.servers 中找不到服务器 'DB1'。请验证指定的服务器名称是否正确。如果需要,请执行存储过程 sp_addlinkedserver 以将服务器添加到 sys.servers。]
        Insus.NET.Base.ExecuteProcedure(String procedureName, SqlDataReader& sqlDataReader, SqlParameter[] prams) +224
        Insus.NET.BusinessBase.GetDataToSqlDataReader(String procedureName, Parameter[] sqlParameter) +302
        Insus.NET.ReceivingNote.IsExistsReceivingNoteByReceiptNumber(String receiptNumber) +89
        System_Inventory_ReceivingIssue_FromMsgp.btnSearch_Click(Object sender, EventArgs e) +168
        System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
        System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +113
        System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
        System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
        System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
        System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4915
        

 


Version Information: Microsoft .NET Framework Version:4.0.20506; ASP.NET Version:4.0.20506.1

应用程序升级,数据库远端务器忘记做连接。用户操作时,出现上面的错误。
具体解决方法,可以参考下面这篇文章:
http://www.cnblogs.com/insus/articles/1508648.html

posted @ 2009-09-09 14:36  Insus.NET  阅读(1899)  评论(0编辑  收藏  举报