Viewing 15 posts - 10,246 through 10,260 (of 49,552 total)
Abu Dina (1/27/2014)
As requested, sample data below:The goal is to dedupe the list of 200 records at Site level. A site being company + address.
So for that set of data,...
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 27, 2014 at 2:18 pm
taseedorf (1/27/2014)
Do most people run DBCC check DB daily? Weekly?
Often enough that restoring from a clean backup is always an option. So if you retain your backups for a week,...
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 27, 2014 at 2:00 pm
Be careful. If you do that you really need to retain all backups (full, diff and log) for a month otherwise there's the chance that you could find corruption 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
January 27, 2014 at 9:04 am
taseedorf (1/27/2014)
does running this prevent backups from taking place or anything like that?
No
Does it block other applications or users from doing certain things while it is being run?
No.
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
January 27, 2014 at 8:16 am
Updates to system tables are not permitted. Besides you shouldn't even be considering changing the system tables. Back in SQL 2000 when that was possible, all sorts of messes were...
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 27, 2014 at 6:45 am
SELECT iu.Item, iu.Description
FROM dbo.SFC_ItemURL iu WHERE Item IN (SELECT t.sku FROM @Tmp t)
Edit: I broke my own rule to always qualify column names 🙁
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 27, 2014 at 6:34 am
Could you explain in more detail please?
"Query the database" - what table name?
"name field as key to a record called description" - are both Name and Description columns in a...
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 27, 2014 at 6:23 am
In that case, remove the GO. GO is a management studio command, designates the end of a batch. If you're using some other tool to access SQL Server, send one...
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 27, 2014 at 6:21 am
How are you executing the code?
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 27, 2014 at 6:00 am
Snapshots are point-in-time views of the database, they're a static view of the database as of the time the snapshot was created.
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 27, 2014 at 5:58 am
I just ran it, no errors.
What version of SQL Server, how are you executing that code?
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 27, 2014 at 5:55 am
Edit: optimised.
CREATE PROCEDURE doStuff
AS
DECLARE @Total1 INT, @Total2 INT, @Total3 INT;
SELECT @Total1 = SUM(col3), @Total2 = SUM(col4), @Total3 = SUM(col5) FROM table1;
DELETE FROM table1;
INSERT INTO table1 (col3,col4,col5) VALUES (@Total1, @Total2,...
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 27, 2014 at 4:40 am
No and no.
Disabling the account just means that it cannot be used to log in to the server. That's it.
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 27, 2014 at 3:51 am
Abu Dina (1/27/2014)
I don't see the benefit of providing sample data in this instance.
I don't see the point of writing you an alternate query if I can't test it on...
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 27, 2014 at 2:42 am
Abu Dina (1/27/2014)
GilaMonster (1/27/2014)
There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.Please share your secret!
Please share some sample data and expected results?
As...
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 27, 2014 at 2:25 am
Viewing 15 posts - 10,246 through 10,260 (of 49,552 total)