Wrong schema used when creating BugNet_IssuesView

Topics: Installing BugNET
Nov 21, 2012 at 12:16 AM
Edited Nov 21, 2012 at 12:30 AM

Setup:

Server 2008 R2 (IIS 7 Forms Authentication)

SQL Server 2008 R2

 

After Instal.aspx upgraded my database I could not use BugNet and found this error in the Event Viewer:

 

Exception information:
    Exception type: DataAccessException
    Exception message: Database Error
   at BugNET.Providers.DataProviders.SqlDataProvider.PerformQuery(List`1 queryClauses, ICollection`1 sortFields, Int32 projectId)
   at BugNET._Default.rptProject_ItemDataBound(Object sender, RepeaterItemEventArgs e)
   at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
   at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
   at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
   at BugNET._Default.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Invalid object name 'BugNet_IssuesView'.
Could not use view or function 'BugNet_P4_CFV' because of binding errors.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 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)
   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.ExecuteReader()
   at BugNET.Providers.DataProviders.SqlDataProvider.ExecuteReaderCmd[T](SqlCommand sqlCmd, GenerateListFromReader`1 gcfr, List`1& list)
   at BugNET.Providers.DataProviders.SqlDataProvider.PerformQuery(List`1 queryClauses, ICollection`1 sortFields, Int32 projectId)

It turned out to be the schema on the BugNet_IssuesView view. It was db_owner but it should be dbo. Just thought I'd let you know so the upgrade script can be fixed.

Coordinator
Nov 21, 2012 at 12:45 AM
Edited Nov 21, 2012 at 1:00 AM

Thanks, I will update the scripts.

Edit: Packages have now been updated with schema fixes