Viewing 15 posts - 2,191 through 2,205 (of 2,647 total)
Run this on your temp table:
with duplicates as (select duplicatecolumn1,duplicatecolumn2, row_number() over (partition by duplicatecolumn1, duplicatecolumn2 order by duplicatecolumn1, duplicatecolumn2) as rowno
from tablename
) delete from duplicates where rowno > 1;
Thanks,
Jared
November 14, 2011 at 10:27 am
It can be annoying to have to change the location every time you restore or create a new database. That's about it. Also, if you have no files in...
November 14, 2011 at 9:01 am
You can change the defaults and restart SQL Server to take effect. However, there are no issues with having the files located somewhere other than the defaults.
Thanks,
Jared
November 14, 2011 at 8:57 am
Ninja's_RGR'us (11/10/2011)
You get the data movement error... when there's data movement. That means pagesplit or possibly if a record is moved to...
November 10, 2011 at 5:59 pm
Scott Levy (11/10/2011)
How did you refresh the local cache, Scott?
Edit | Intellisense | Refresh Local Cache (Shift+Control+R)
It only appears when you have a query open for editing I think.
Scott
Just to...
November 10, 2011 at 3:22 pm
Iulian -207023 (11/10/2011)
Page splits might be due to index fragmentationIulian
Actually, I believe that is reversed... index fragmentation comes from page splits. However, that's besides the point. I'm sorry I'm...
November 10, 2011 at 2:20 pm
Sapen (11/10/2011)
Also, In the sql server error log I am seeing the below errors at the same time when the timeouts occurred.
Process 0:0:0...
November 10, 2011 at 1:48 pm
Iulian -207023 (11/10/2011)
Jared I don't think that NOLOCK can generate the...
November 10, 2011 at 1:46 pm
Sapen (11/10/2011)
November 10, 2011 at 12:33 pm
For searching SPs:
USE dbName
SELECT Distinct SO.Name
FROM sysobjects SO (NOLOCK)
INNER JOIN syscomments SC (NOLOCK) on SO.Id = SC.ID
AND SO.Type = 'P'
AND SC.Text LIKE '%Text needed%'
ORDER BY SO.Name
For searching columns:
SELECT o.name as...
November 10, 2011 at 12:11 pm
apatel 89420 (11/10/2011)
I have a table that i need to query to get distinct procduct # > 2009-01-01.
table structure
Product # ProductManager Status ...
November 10, 2011 at 12:07 pm
Sapen (11/10/2011)
SQL Command Failed; SQL = gw_LookupURI
---------------------------------------
This message originates
in FillDataSetFromStoredProc(),
in the w3wp process on the server
WEBSERVER:
AppDomain = /LM/W3SVC/4/ROOT/EZMed-1-129652918758885483
---------------------------------------
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed...
November 10, 2011 at 12:03 pm
GilaMonster (11/10/2011)
For queries affected by poor stats, normal monitoring and look for queries with erratic durations. Investigate and see...
November 10, 2011 at 9:40 am
Iulian -207023 (11/10/2011)
another table that updates every hour and there is a query that...
November 10, 2011 at 9:36 am
Also Gail, could you point me in a direction or tell me how to test/monitor this? Would I do it for a specific query or look at wait stats...
November 10, 2011 at 8:15 am
Viewing 15 posts - 2,191 through 2,205 (of 2,647 total)