Viewing 15 posts - 41,326 through 41,340 (of 49,552 total)
andy.dicken (1/29/2009)
I guess the correct command to use is a simple DBCC SHRINKFILE ('filename', ) command?
No. Truncate removes inactive log records but doesn't change the size of the file. Shrink...
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
January 29, 2009 at 4:26 am
Looks like a stale read or a lost write, usually caused by a mis-behaving disk cache. Check your hardware, see if there are any errors in any logs
I don't 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
January 29, 2009 at 4:19 am
baumgaertner (1/29/2009)
Here the code:
if (select nDbSubVersion from tblVersion) = 2
begin
alter table tblCustAttrDefValue add strHelpValue varchar(200) null
end
go
if (select nDbSubVersion from tblVersion) = 2
begin
...
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
January 29, 2009 at 4:15 am
baumgaertner (1/29/2009)
Can you describe it?
The way you had it in your last post. Two ifs with a GO in between.
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
January 29, 2009 at 2:21 am
baumgaertner (1/29/2009)
What do you mean by dynamic SQL?I hope not "EXEC".
Yes. (or sp_executesql, same thing)
It's that, or break the batch using GO. Your choice.
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
January 29, 2009 at 2:11 am
Thought I remembered this: http://www.sqlservercentral.com/Forums/FindPost613599.aspx
Matt's advice (the last post of that thread) is good. Use dynamic SQL.
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
January 29, 2009 at 2:06 am
baumgaertner (1/29/2009)
Is there any chance to suppress this syntax error?
No.
Do you have a workaround?
Why do you have an if block that will never be executed in the first place? If...
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
January 29, 2009 at 1:49 am
You're confusing compile-time errors and run-time errors.
At compile time, the entire batch is checked for valid syntax and valid objects. If there's anything wrong, a syntax error is generated. This...
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
January 29, 2009 at 12:44 am
amit (1/29/2009)
I dnt know if the following existing.. just curious.. is there any dbcc checkdb with no_data_loss....
Yes. It's the REPAIR_REBUILD option. It only fixes things is all of the corruption...
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
January 29, 2009 at 12:35 am
Matt Cherwin (1/28/2009)
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
January 29, 2009 at 12:05 am
Steve Jones - Editor (1/28/2009)
I leave for lunch, 98 pages of answerscome back, 102.
You need to take shorter lunch breaks. 😀
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
January 28, 2009 at 11:54 pm
LCAD (1/28/2009)
What would be THE cheapest query I can run on a table to get the desired effect?
SELECT * FROM TableName
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
January 28, 2009 at 11:46 pm
amit (1/28/2009)
Note that i can afford to lose data on the database. It contains essential info.
Do you have a clean backup? One without the corruption?
If you do, then you can...
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
January 28, 2009 at 11:45 pm
Why don't you use temp tables? Then there's no worries about locking (only your process has access) and you don't need to worry about dynamic names.
In the future, please post...
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
January 28, 2009 at 1:52 pm
I'm not sure what you're asking. Could you give more detail please?
Are you asking for the reasons why we might create a clustered index or a nonclustered index?
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
January 28, 2009 at 1:48 pm
Viewing 15 posts - 41,326 through 41,340 (of 49,552 total)