Viewing 15 posts - 8,866 through 8,880 (of 49,552 total)
SQLRNNR (5/29/2014)
Here's one more - Devs with SA access
Fixed that for you.
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
May 29, 2014 at 1:06 pm
Restore the database from a clean backup, before the corruption occurred. You have some corruption more sever than just that table or checkDB wouldn't have aborted with an error
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
May 29, 2014 at 1:04 pm
Gangadhara MS (5/29/2014)
Microsoft recommends For the TEMPDB database, create 1 data file per CPU.
That recommendation belongs in the garbage.
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
May 29, 2014 at 12:47 pm
I said different scopes, not different batches. The batch is the unit of parsing (hence causing the OP's problem)
CREATE PROCEDURE T1 AS
CREATE TABLE #Temp1 (Col1 int)
IF @@NESTLEVEL <= 10
EXEC T1
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
May 29, 2014 at 12:15 pm
Nolock
Nested views
Scalar UDFs
Queries that try to handle too many possible cases
Developers who think they know more than I do. 😉 :hehe:
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
May 29, 2014 at 12:11 pm
Dave Mason (5/29/2014)
Msg 8921, Level 16, State 1, Line 1
Check terminated....
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
May 29, 2014 at 12:00 pm
Eirikur Eiriksson (5/29/2014)
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
May 29, 2014 at 11:58 am
TheSQLGuru (5/27/2014)
GilaMonster (5/27/2014)
TheSQLGuru (5/27/2014)
You also have the dreaded IS NULL OR constructHow did I miss that....
Because you have seen it so much you just don't see it any more?!? :hehe:
Pretty...
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
May 29, 2014 at 11:46 am
Indeed. There are far more ways to get this wrong than get it right, and even when right it often slows things down.
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
May 29, 2014 at 11:44 am
ramana3327 (5/29/2014)
They want to me create the a temptable or table variable for the main query output and then try to avoid the left outer join.
They want you to add...
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
May 29, 2014 at 11:43 am
ramana3327 (5/29/2014)
The dev is saying that we can still implement that query by avoiding that joins.
So go to that dev and ask him to please show you the magic...
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
May 29, 2014 at 11:41 am
It's because batches are parsed as a whole, then executed. When the parser hits the second create for that table it fails. It works with the debug break because 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
May 29, 2014 at 11:33 am
Does the table have a clustered 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
May 29, 2014 at 3:58 am
Aside, you don't need to create a dummy database to restore over. Just restore the backup and specify the name you want the DB to have in the restore statement.
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
May 29, 2014 at 2:26 am
tshad (5/28/2014)
I then drop the table and recreate it in a Select/Into clause but I get the error:
There is already...
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
May 29, 2014 at 2:25 am
Viewing 15 posts - 8,866 through 8,880 (of 49,552 total)