Hi Coders,
We have two servers like development(windows server 2008 R2 and SQL server 2005 and visual studio 2010) and deployment(windows server 2008 R2 and SQL server 2005)server.
in the deployment server we have deployed asp.net application from development server 2 years back.
in that asp.net application we have referenced dlls are following,
Microsoft.SqlServer.ConnectionInfo.dll-> version:10.0
Microsoft.SqlServer.Management.Sdk.Sfc.dllversion:10.0
Microsoft.SqlServer.Smo.dll-> version:10.0
Microsoft.SqlServer.SmoExtended.dll-> version:10.0
Microsoft.SqlServer.SqlClrProvider.dll-> version:10.0
Microsoft.SqlServer.SqlEnum.dll-> version:10.0
it was working fine with this dlls.
Later in the development server we have added the following latest references to the project,
Microsoft.SqlServer.ConnectionInfo.dll-> version:11.0
Microsoft.SqlServer.Management.Sdk.Sfc.dllversion:11.0
Microsoft.SqlServer.Smo.dll-> version:11.0
Microsoft.SqlServer.SmoExtended.dll-> version:11.0
Microsoft.SqlServer.SqlClrProvider.dll-> version:11.0
Microsoft.SqlServer.SqlEnum.dll-> version:11.0
In the development server it is working fine without any issues.
After testing done we deployed this to the deployment server, when we running the application, it was throwing the following error,
Error:
"CopyExceptionFailedException: Copy exception failed for Microsoft.SqlServer.Management.Smo.FailedOperationException: Exception has been thrown by the target of an invocation. See the inner exception for the original error. ---> Microsoft.SqlServer.Management.Smo.FailedOperationException: Prefetch objects failed for Database 'Test_Newsetup_RDM'. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Microsoft.SqlServer.Management.Smo.SqlPropertyMetadataProvider.PropertyNameToIDLookupWithException(String propertyName, PropertyAccessPurpose pap) at Microsoft.SqlServer.Management.Smo.PropertyCollection.GetValueWithNullReplacement(String propertyName, Boolean throwOnNullValue) at Microsoft.SqlServer.Management.Smo.Database.CheckDbCompatibilityLevel() at Microsoft.SqlServer.Management.Smo.Database.PrefetchObjectsImpl(Type objectType, ScriptingOptions scriptingOptions) --- End of inner exception stack trace --- at Microsoft.SqlServer.Management.Smo.Database.PrefetchObjectsImpl(Type objectType, ScriptingOptions scriptingOptions) at DbTools.DbaTasks_CatModelling.Workflow.CopyDatabaseObjectsCmd.GenerateScripts()"
I am unable to figure out the issue, after deployment is done on the deployment server is this restart required for the deployment server.
Regards
KishoreD