Viewing 15 posts - 19,816 through 19,830 (of 49,552 total)
No, nvarchar and nchar don't require conversions. Now if one had been varchar or char you should make the change, but both being unicode is fine.
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
March 12, 2012 at 7:27 am
Second the restart recommendation. It is documented that shrinking TempDB while in use can cause corruptions that will force a restart.
Also you need to investigate what caused the growth,...
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
March 12, 2012 at 7:14 am
Post command used and exact error message please.
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
March 12, 2012 at 7:12 am
Then that's a likely cause. Old-format stats can affect just about all queries.
Look up UPDATE STATISTICS. Suggest all tables WITH FULLSCAN.
Also make sure that he's done the recommended consistency checks...
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
March 12, 2012 at 7:11 am
Did you update all statistics after the upgrade.
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
March 12, 2012 at 7:01 am
gugan_ta (3/12/2012)
You can try this..but I'm afraid this can be standard soln...go for ##table
There is no need for a global temp table here.
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
March 12, 2012 at 6:55 am
chandrika.r 91171 (3/12/2012)
Thank you Gila..It worked for me.but just want to know Is there any disadvantage in using local temporary table?
No, it's almost the same as a table variable, may...
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
March 12, 2012 at 6:55 am
No, restoring a database over an existing one will always replace it entirely. You can't merge two databases with restore.
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
March 12, 2012 at 5:34 am
If you absolutely need the dynamic SQL, this will work.
CREATE TABLE #tbl_temp (ApplicationId int,ACPId int)
Declare @SqlQuery varchar(max)
insert into #tbl_temp values(444,12215)
insert into #tbl_temp values(444,13801)
set @SqlQuery='select * from Invoice I inner join...
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
March 12, 2012 at 5:31 am
MysteryJimbo (3/12/2012)
The only way you can make a temporary table globally visible (not table varible that you declared) is to use create table ##tablename(column int)
Errr, no need for global temp...
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
March 12, 2012 at 5:30 am
Use a temp table instead of a table variable, that way it will be visible within the scope of the dynamic SQL (which I still see no reason for)
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
March 12, 2012 at 5:29 am
The table variable has no visibility within the dynamic SQL, it's only visible in the scope that it's declared in.
That said, there is absolutely no need for dynamic SQL in...
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
March 12, 2012 at 4:55 am
What was the exact command that you used? How big are the tables in question (how many pages)?
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
March 12, 2012 at 4:48 am
Star Trek (3/12/2012)
When we say it is read only what happens if I insert fresh rows into the table having columnstore index?
The insert will fail. Any table with a columnstore...
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
March 12, 2012 at 4:30 am
You could likely do it in a single update with ntile.
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
March 12, 2012 at 4:24 am
Viewing 15 posts - 19,816 through 19,830 (of 49,552 total)