Viewing 15 posts - 481 through 495 (of 560 total)
shohelr2003 (11/11/2012)
I have a database of 400 tables. I set the default size of database file is 20 GB and log file is 2.5 GB. These files are set to...
November 12, 2012 at 9:50 am
Grant Fritchey (10/22/2012)
sql-lover (10/22/2012)
I thought deadlocks (most of them) were due poor or bad code; a process...
October 22, 2012 at 1:41 pm
-Check if you have open transactions. If that's the case, that space cannot be released.
-Try using T-SQL, instead of GUI. I do not know why, sometimes MS-SQL acts strange
*** EDIT...
October 22, 2012 at 10:00 am
GilaMonster (10/22/2012)
Most likely the reason the deadlocks have gone away is that the rebuild also updates stats, which invalidates...
October 22, 2012 at 9:22 am
you would never insert into the old/history table
... that is correct. I did not imply that. The table is there for historical purposes or data retrieval, and for...
October 19, 2012 at 7:42 am
Lynn Pettis (10/19/2012)
CREATE TABLE dbo.MyTable_A(
c1 int PRIMARY KEY CHECK (c1 BETWEEN 12501 AND 1000000000),
c2 int IDENTITY)
GO
CREATE TABLE...
October 19, 2012 at 7:29 am
Lowell (10/19/2012)
sql-lover (10/18/2012)
Like I explained, the PK is a surrogate key. MS-SQL needs to generate the key itself, no manual intervention.
The real tables are more complex. I just simplified it...
October 19, 2012 at 7:09 am
Lynn Pettis (10/18/2012)
Why are you limiting the identity column c1 in MyTable_A to only have a value between 11 and 20? That isn't how identity columns work.
Again,
It was an...
October 18, 2012 at 11:38 pm
That is correct!
Like I explained, the PK is a surrogate key. MS-SQL needs to generate the key itself, no manual intervention.
Here's the modified code ...
IF OBJECT_ID ('dbo.MyTable_A') IS NOT NULL
...
October 18, 2012 at 3:12 pm
Do I have to use SET IDENTITY INSERT on the trigger itself? When inserting, I am getting this error ...
Cannot insert explicit value for identity column in table 'MyTable_A' when...
October 18, 2012 at 2:44 pm
Lowell (10/18/2012)
but if you don't want to use a trigger,...
October 18, 2012 at 1:41 pm
davidwarner (10/9/2012)
October 10, 2012 at 7:20 am
davidwarner (10/9/2012)
October 9, 2012 at 9:56 pm
After lot of testing, will go with this logic ...
DECLARE @i INT;
DECLARE @chunk INT;
DECLARE @maxNewTable INT;
SET @i = ( SELECT MIN(ID) FROM OldTable WITH (NOLOCK)...
October 8, 2012 at 12:15 pm
bteraberry (10/3/2012)
My bad on @@ROWCOUNT ... that value should...
October 8, 2012 at 7:52 am
Viewing 15 posts - 481 through 495 (of 560 total)