Viewing 15 posts - 541 through 555 (of 902 total)
Anthony,
Cant you can also get Minimal logging from an INSERT INTO....SELECT, statement if using SQL 2008 R2 or later, under certain circumstances?
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 14, 2012 at 3:39 am
In simple mode it will be minimal logging as you say the log will still grow but empty on completion, bulk-logged as far as im aware (please correct me i...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 14, 2012 at 3:13 am
If Logging isnt a priority on the Archive DB then set the recovery model to Simple.
Also Does IISLog get deleted/renamed every day, as part of the archive process?
As the Select...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 14, 2012 at 2:44 am
Heres one solution, using a Row_Number() to select the second record, but it depends on the order by
Declare @t as Table (a int, b date)
insert into @t (a,b)values('2','2012-12-21')
insert into...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 14, 2012 at 1:30 am
John Mitchell-245523 (11/13/2012)
Or use logarithms:
CREATE TABLE #john (ID int, Factor decimal(5,3))INSERT INTO #john VALUES
(1,1.1),
(2,1.1),
(1,1.1),
(2,1.2)
SELECT * FROM #john
DECLARE @x decimal(5,3)
SET @x = 12
SELECT
ID
,EXP(SUM(LOG(Factor))) * @x AS Answer
FROM
#john
GROUP BY
ID
John
+1, :blush:...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 13, 2012 at 9:01 am
post removed, Better solution below......
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 13, 2012 at 8:57 am
There are a couple of errors in your merge.
I would ask you ID is a varchar(10) when you have the ID as an IDENTITY in your original User table creation...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 13, 2012 at 5:55 am
what version os SQL is the server running?
The reason for asking is that I thought they'd removed the functionality for BACKUP LOG WITH TRUNCATE_ONLY from SQL2008.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 13, 2012 at 3:43 am
A very nice article jeff, Its given me a few Ideas on how to change one of the Hierarchy builders I have, just need to find the down time to...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 13, 2012 at 1:29 am
I've seen this behaviour before, though it normally occured when the SSIS package files where copied and the GUID's didnt get reset.
I think it had something to do with the...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 7:53 am
If its a single level then
Select
*
From Parent P1
LEFT JOIN Parent P2 on P1.Id=P2.ParentId
If its a multi level then you will need to lookup a Recursive CTE http://msdn.microsoft.com/en-us/library/ms186243(v=sql.105).aspx
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 5:13 am
GilaMonster (11/9/2012)
Jason-299789 (11/9/2012)
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 4:27 am
Yes you would have to have a second update for Table3, and the stucture would be the same except that you would change the Table1 references to Table3.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 1:27 am
Thanks, its a habit on the Where as Im used to working with huge datasets so anything to limit the scope of the update to the bare minium number of...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 1:16 am
Looking at the Query you've posted, this will be VERY VERY slow in a cursor as its doing a RBAR itteration over a dataset, on 20-30 rows you might not...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 12, 2012 at 1:04 am
Viewing 15 posts - 541 through 555 (of 902 total)