I have also encountered this error. I have staging working from our dev to staging servers. I get this error when i try to view the servers that are added to the staging environment. You can find the information from the event log below.
Message:
WITH AllData AS
(
SELECT [ServerID], [ServerDisplayName], [ServerEnabled], ROW_NUMBER() OVER (ORDER BY ServerDisplayName) AS [CMS_RN] FROM Staging_Server WHERE (ServerSiteID = )
)
SELECT , (SELECT COUNT() FROM AllData) AS [CMS_TOT] FROM AllData WHERE CMS_RN BETWEEN 1 AND 25 ORDER BY CMS_RN
Caused exception:
Incorrect syntax near ')'.
Exception type: System.Exception
Stack Trace:
at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex)
at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords)
at CMS.DataEngine.DataQueryBase1.GetDataFromDB()
at CMS.DataEngine.DataQueryBase
1.GetData()
at CMS.DataEngine.DataQueryBase1.get_Result()
at CMS.DataEngine.ObjectQueryBase
2.GetResults(IDataQuery query, Int32& totalRecords)
at CMS.DataEngine.ObjectQueryBase2.GetDataFromDB()
at CMS.DataEngine.DataQueryBase
1.GetData()
at CMS.DataEngine.ObjectQueryBase2.GetData()
at CMS.DataEngine.DataQueryBase
1.get_Result()
at CMS.UIControls.UniGrid.LoadDataFromDataQuery(IDataQuery q, Boolean applySettings)
at CMS.UIControls.UniGrid.RetrieveData()
at CMS.UIControls.UniGrid.ReloadData()
Message: Incorrect syntax near ')'.
Exception type: System.Data.SqlClient.SqlException
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
Message:
DataConnection.HandleError: