Config DB error
SharePoint 2007
Good day,
stsadm command is giving me some grief.
When I try enumsites, it get the error:
This operation can be performed only on a computer that is joined to a server fa
rm by users who have permissions in SQL Server to read from the configuration da
tabase.
When I try preupgradecheck, I get the generic error:
Object reference not set to an instance of an object
I've checked my permissions (several times). I'm farm admin, local admin on Front End and SQL server, plus I have all permissions to content databases.
I've also searched the tech forums, with no joy
Following is the error log:
stsadm: Running enumsites
Initializing the configuration database connection.
An exception occured while trying to acquire the local farm: System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection'
threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters'
threw an exception. ---> System.PlatformNotSupportedException: This operation is only supported on Windows 2000 SP3 or later operating systems.
at System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType sidType, SecurityIdentifier domainSid)
at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
at System.Diagnostic...
...s.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime
lifetime) at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)
at System.Data.ProviderBase.DbConnectionPoolCounters.Counter..ctor(String categoryName, String instanceName, String counterName, PerformanceCounterType counterType)
at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp)
at System.Data.SqlClient.SqlPerformanceCounters..ctor()
at System.Data.SqlClient.SqlP...
...erformanceCounters..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnectionFactory..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnection..cctor()
--- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnection..ctor()
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior)
at Microsoft.SharePoint.Administration.SPConfigurationDatabase.FetchId(QualifiedObjectName qName)
at Microsoft.SharePoint.Administration.SPConfigurationDatabase.GetObject(String name, Guid parentId, Type type)
...
...
at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm()
at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)
stsadm: This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server
to read from the configuration database. To connect this server to the server farm, use the SharePoint Products and Technologies Configuration Wizard, located on the Start menu in Administrative Tools. Callstack:
at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(Uri requestUri)
at Microsoft.SharePoint.StsAdmin.SPEnumSites.Run(StringDictionary keyValues)
at Microsoft.SharePoint.StsAdmin.SPStsAdmin.RunOperation(SPGlobalAdmin globalAdmin, String strOperation, StringDictionary keyValues, SPParamCollection pars)
Now terminating ULS (STSADM.EXE, onetnative.dll)
tia for your help
Take care,
mpt
March 11th, 2011 9:22pm
It seems you do not have permissions to the config database. This command will retrieve information which are stored in the config database. Check you permissions in the config database. It is better to use a service account to get this data rather
than using a personal account (even if admin on the server).
Thanks,
DipDip
http://dzeee.net/sharepoint
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2011 3:00am
I've checked my permissions to the config database several times. It still remains a problem with my account.
I am however able to run the command using the service account as recommended. Thanks for that.
mpt
March 12th, 2011 6:43am