Viewing 15 posts - 5,446 through 5,460 (of 7,597 total)
ALTER TABLE dbo.person_test2
ADD CONSTRAINT CK_ext
CHECK ( Pext LIKE REPLICATE('[0-9]', LEN(Pext)) )
January 16, 2015 at 3:06 pm
You really shouldn't need full securityadmin just to grant EXECUTE on a proc(s):
GRANT EXECUTE TO user1 WITH GRANT OPTION
January 16, 2015 at 3:01 pm
FILLFACTOR directs SQL on how full to make each page of data. 96% leaves 4% -- roughly 300 bytes -- free on each page to allow for new rows...
January 16, 2015 at 12:34 pm
Technically it should be left at 0, as that's more secure.
January 15, 2015 at 3:46 pm
The ROLLBACK could indeed cause an error if a transaction wasn't active at the time. Here's how to correct that:
IF XACT_STATE() <> 0
BEGIN
ROLLBACK;
END;
January 15, 2015 at 3:46 pm
You can use a PK or simply a UNIQUE constraint or index. For example:
CREATE UNIQUE CLUSTERED INDEX Student_Classes__CL
ON dbo.Student_Classes ( Student_ID, Class_ID ) WITH...
January 15, 2015 at 3:43 pm
T_Peters (1/14/2015)
January 14, 2015 at 4:28 pm
Or even another view. A view could also explicitly reference objects in a different db.
January 14, 2015 at 4:24 pm
Were the backups using compression before and are did not use compression last time for some odd reason?
January 14, 2015 at 4:21 pm
The complexity of the plan is also a factor in how much SQL weights keeping a plan in cache (by assigning more complex plans higher initial values).
Also, I believe ad-hoc...
January 14, 2015 at 4:01 pm
curious_sqldba (1/13/2015)
ScottPletcher (1/13/2015)
DECLARE @BatchSize int
DECLARE @RowRount int
DECLARE @TableRowCount int
DECLARE @TableRowLimit int
SET @BatchSize = 10000
SELECT @TableRowCount = COUNT(*)
FROM PtActs WITH (NOLOCK)
SET @TableRowLimit...
January 13, 2015 at 1:59 pm
RHJ (1/13/2015)
January 13, 2015 at 1:56 pm
Technically you should still be dealing with a logical not a physical design, i.e. "entities" rather than "tables". but let's jump ahead to tables anyway, I guess.
You're missing at least...
January 13, 2015 at 1:31 pm
I'd try instead to just:
(1) just in case, as a backup, copy existing key column(s) and data column to be changed to a keyed backup table
(2) verify that existing data...
January 13, 2015 at 11:51 am
You don't need to re-count the rows every time.
DECLARE @BatchSize int
DECLARE @RowRount int
DECLARE @TableRowCount int
DECLARE @TableRowLimit int
SET @BatchSize = 10000
SELECT @TableRowCount = COUNT(*)
FROM PtActs WITH (NOLOCK)
SET @TableRowLimit = 10050000
WHILE...
January 13, 2015 at 10:45 am
Viewing 15 posts - 5,446 through 5,460 (of 7,597 total)