Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Sunday, September 22, 2013

The SQL Server (MSSQLSERVER) service terminated with service-specific error %%17058.

While trying to failover the SQL server to another node, it refused to start and this error was getting logged in the Event Viewer

The SQL Server (MSSQLSERVER) service terminated with service-specific error %%17058.
The problem turned out to be with ERRORLOG being set to read only.

After I cleared the read only attribute from MSSQL\LOG\ERRORLOG the service started successfully.

Tuesday, April 2, 2013

Top SQL Queries

select
highest_cpu_queries.plan_handle,
highest_cpu_queries.total_worker_time,
highest_cpu_queries.total_logical_reads,
highest_cpu_queries.total_logical_writes,
highest_cpu_queries.execution_count,
q.dbid,
q.objectid,
q.number,
q.encrypted,
q.[text]
from
(select top 20
qs.plan_handle,
qs.total_worker_time,
qs.total_logical_reads,
qs.total_logical_writes,
qs.execution_count
from
sys.dm_exec_query_stats qs
order by qs.total_worker_time desc) as highest_cpu_queries
cross apply sys.dm_exec_sql_text(plan_handle) as q
order by highest_cpu_queries.total_worker_time desc
--order by highest_cpu_queries.total_logical_reads desc
--order by highest_cpu_queries.total_logical_writes desc
--order by highest_cpu_queries.execution_count desc

--select top 10 * from sys.dm_exec_query_stats qs

Tuesday, June 19, 2012

Using Microsoft SQL Report Builder 3 to create custom SCOM 2007 R2 reports

In SCOM 2007 R2 if you click "Design a new report" from the Reporting tab you will notice that Report Builder version 1 runs, even if you have version 3 installed because SCOM still opens the old link.
To use 3 instead navigate to the C:\Program Files\Microsoft SQL Server\MSRS10_50.SCOM\Reporting Services\ReportServer\ReportBuilder


Make a copy of "ReportBuilder_3_0_0_0.application"


Rename "ReportBuilder.application"


Rename the copy of version 3 to "ReportBuilder.application"


Now when you "Design a new report", SCOM will run Report Builder 3.

Sunday, September 18, 2011

Test SQL Connectivity Without Management Studio

If you need to test SQL connectivity from a web to the database server and not just ICMP or TCP without having to install the SQL Client Tools, you can use the ODBC control panel applet to setup a data source using the connection parameters you want to test