Viewing 15 posts - 31,906 through 31,920 (of 49,552 total)
In addition to doing it manually (and I can tell you a couple horror stories about times when I thought I was clever enough to do something like this via...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 9, 2010 at 6:19 am
Nils Gustav Stråbø (7/8/2010)
GilaMonster (7/8/2010)
As in all cases where the CTE is part of a larger batch, the preceding command must be terminated by a ;
I order to not forget...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 4:23 pm
Works fine (as in creates without syntax error) for me
create procedure [dbo].[sp_rptCollectionNotice]
(@cycle varchar(2))
AS
SET NOCOUNT ON;
WITH PullMaxPrintdate (account,customer,PRINTNOTICE,BALANCEOWING) AS
(
select t.account,t.customer,t.PRINTNOTICE,BALANCEOWING
from
(
...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 3:48 pm
Dan.Humphries (7/8/2010)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 3:21 pm
Stick the code in a stored procedure, call the stored procedure from SSRS. That way you can use anything you like.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 3:03 pm
You find the exact fragmentation in sys.dm_db_index_physical_stats, in the avg_fragmentation_in_precent column. Check it before and after rebuild to see the change.
If the fragmentation's not decreasing, there's a common reason: the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 2:49 pm
Please post query, table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 2:47 pm
doobya (7/8/2010)
that a predicate can be always be rewritten to be seekable?
and...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 2:46 pm
Edit: nevermind...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 2:36 pm
I've seen that once before, when I was playing with corruption. Happened when there was an active transaction when the DB went suspect. Not sure why.
As far as I know,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 1:24 pm
Ellen-477471 (7/8/2010)
Although I have to say why will it let me run checkdb with repair but not checktable with repair?
Because SQL knows that the database is damaged and needs repairing...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 1:17 pm
CirquedeSQLeil (7/8/2010)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 1:17 pm
*edit* Never mind.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 1:02 pm
If the database is in emergency mode, you have to run CheckDB with the repair_allow_data_loss option to have a chance of bringing it back online. CheckTable is not sufficient. That...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 12:55 pm
GilaMonster (7/8/2010)
Did I miss a major announcement or something?
I should have added a </sarcasm> or something to that post. I know full well that, other than SQL Server 2008 R2's...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 8, 2010 at 12:47 pm
Viewing 15 posts - 31,906 through 31,920 (of 49,552 total)