Viewing 15 posts - 991 through 1,005 (of 1,231 total)
You can also include the percent/ratio in your sql query and pass it as a column to the report via the result set.
Example ::
USE ADVENTUREWORKS2008R2;
Go
SELECT
personType, count(*) as Total,...
June 11, 2014 at 4:19 pm
I would say that a SQL Server job does not roll back the preceding steps when you encounter a step that fails. You can add all your SP calls to...
June 11, 2014 at 12:41 pm
To find tables to remove .. I am assuming you want those less/most used to be flagged somehow?
This tells you the tables most accessed
SELECT
t.name AS 'Table',
SUM(i.user_seeks...
May 29, 2014 at 6:59 pm
Nice script. Could be modified to show which are the ones with elevated fragmentation.
May 29, 2014 at 6:30 pm
MMartin1 (5/28/2014)
You could try
WITH Ordered AS
(
SELECT*, ROW_NUMBER() OVER ( PARTITION BY name ORDER BY Id) AS RN
FROM #mytable where ID
in ('TIX123','TIX999')
)
select * from ordered
where RN=1
to move the...
May 28, 2014 at 1:43 pm
With batches, it is meant you can try something like
WITH Ordered AS
(
SELECT*,
ROW_NUMBER() OVER ( PARTITION BY name ORDER BY Id) AS RN,
ROW_NUMBER() OVER ( ORDER BY...
May 28, 2014 at 1:41 pm
You could try
WITH Ordered AS
(
SELECT*, ROW_NUMBER() OVER ( PARTITION BY name ORDER BY Id) AS RN
FROM #mytable where ID
in ('TIX123','TIX999')
)
select * from ordered
where RN=1
to move the data...
May 28, 2014 at 1:19 pm
Keep a watch on the distributor's transaction log, make sure it doesn't fill to capacity or that will halt things.
May 27, 2014 at 5:53 pm
It could just be the report server that renders the report may be low on Ram or disk space, running a heavy process (maybe a anti-virus scan). Have you looked...
May 23, 2014 at 12:08 pm
I would take a cursor over a triangular join if I was reporting on a running total in a columns. That's once instance.
May 23, 2014 at 11:32 am
I'm going to take a wild guess here. You have a exec SP in your ole db datasource ... that itself inserts data to a table... and is also passing...
May 21, 2014 at 10:55 pm
You could use SSIS to guess/generate an XSD for you. Create a data flow task with an xml source. If you have the XSD file then even better. Dump the...
May 21, 2014 at 8:39 pm
hi Lowell,
I'm curious why you need the +1 in the query
use msdb;
GO
DBCC CHECKIDENT ('dbo.backupset')
SELECT MAX(backup_set_id) + 1 FROM dbo.backupset
if the current identity is less than the max row in...
May 21, 2014 at 7:12 pm
Not sure. Has the agent account password changed recently? Has disk space on the distributor filled up? Is the transaction log full on the distributor database?
May 21, 2014 at 6:52 pm
For the current month ...
WITH MYCTE AS (
SELECT row_number() over (order by [dates] DESC ) as dayNum, [dates], datename(weekday, dates) as [Day Name]
FROM
( /* the last seven days in...
May 21, 2014 at 6:30 pm
Viewing 15 posts - 991 through 1,005 (of 1,231 total)