Sunday, September 22, 2013

[SQL 2012] Adhoc queries and DB id

[SQL 2012] Adhoc queries and DB id


Adhoc queries and DB id

Posted: 21 Sep 2013 05:42 PM PDT

Dear AllI want to get last executed queries on a DB. Using dm_exec_query_plan , dm_exec_query_stats ,dm_exec_sql_text gives this information. But it shows null values for adhoc queries.How to get DB id for adhoc queries?Regards

Unable to upgrade SQL Server 2008 r2 cluster to SQL Server 2012 SP1, failes with Failed to retrieve data for this request

Posted: 21 Sep 2013 06:49 AM PDT

I don't really understand why it would fail. Sometimes when I start the setup process it is fine, next time it doesn't work. I'm not comfortable continuing with the upgrade it being flaky like this. I'm just wondering what could cause this? Here's the output from the logs:(01) 2013-09-21 13:40:18 Slp: Running Action: RunRemoteDiscoveryAction(01) 2013-09-21 13:40:18 Slp: Running discovery on local machine(01) 2013-09-21 13:40:20 Slp: Discovery on local machine is complete(01) 2013-09-21 13:40:20 Slp: Running discovery on remote machine: PC1N1(01) 2013-09-21 13:41:31 Slp: Discovery on PC1N1 failed due to exception(01) 2013-09-21 13:41:31 Slp: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Configuration.Sco.SqlRegistryException: The handle is invalid. at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess) at Microsoft.SqlServer.Configuration.Sco.SqlRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess) at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer ctx, String machineName, RegistryView regView, String regPath, RegistryAccess registryAccess) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetInstanceHiveForSqk2kInstance(String machineName, String instanceName, RegistryView regView) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetSql2kMsiInstanceListInHive(String machineName, RegistryView regView) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.LoadSql2kInstanceList(String machineName) at Microsoft.SqlServer.Discovery.Product.GetData(EnumResult erParent) at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData() at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci) at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request) at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request) --- End of inner exception stack trace --- at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)(01) 2013-09-21 13:41:31 Slp: Error: Action "Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction" threw an exception during execution.(01) 2013-09-21 13:41:31 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Configuration.Sco.SqlRegistryException: The handle is invalid.(01) 2013-09-21 13:41:31 Slp: Exception type: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException(01) 2013-09-21 13:41:31 Slp: Message: (01) 2013-09-21 13:41:31 Slp: Failed to retrieve data for this request.(01) 2013-09-21 13:41:31 Slp: HResult : 0x80131500(01) 2013-09-21 13:41:31 Slp: Data: (01) 2013-09-21 13:41:31 Slp: HelpLink.ProdName = Microsoft SQL Server(01) 2013-09-21 13:41:31 Slp: HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink(01) 2013-09-21 13:41:31 Slp: HelpLink.LinkId = 20476(01) 2013-09-21 13:41:31 Slp: Stack: (01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)(01) 2013-09-21 13:41:31 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)(01) 2013-09-21 13:41:31 Slp: Inner exception type: Microsoft.SqlServer.Configuration.Sco.SqlRegistryException(01) 2013-09-21 13:41:31 Slp: Message: (01) 2013-09-21 13:41:31 Slp: The handle is invalid.(01) 2013-09-21 13:41:31 Slp: (01) 2013-09-21 13:41:31 Slp: HResult : 0x84d10006(01) 2013-09-21 13:41:31 Slp: FacilityCode : 1233 (4d1)(01) 2013-09-21 13:41:31 Slp: ErrorCode : 6 (0006)(01) 2013-09-21 13:41:31 Slp: Data: (01) 2013-09-21 13:41:31 Slp: WatsonData = Microsoft.SqlServer.Configuration.Sco.SqlRegistryException@Win32ErrorOne interesting fact is, setups always works without an issue when I run it on an active node.

No comments:

Post a Comment

Search This Blog