Viewing 15 posts - 2,821 through 2,835 (of 49,571 total)
Assuming that's the real table design, stop worrying about the clustered index and start worrying about how very badly that EAV design performs in general, and consider either a relational...
July 8, 2016 at 8:33 am
yujinagata72 (7/8/2016)
TheSQLGuru (7/5/2016)
Download a copy of Glenn Berry's SQL Server Diagnostic Scripts for your version of SQL Server. An AMAZING collection of free stuff there!
From Glenn's script, I can find...
July 8, 2016 at 8:15 am
Phil Parkin (7/8/2016)
GilaMonster (7/8/2016)
Phil Parkin (7/8/2016)
SQL!$@w$0ME (7/8/2016)
Does the clustered key column(s) has to be NOT NULL/UNIQUE as best practice?
Yes. Otherwise SQL Server has to create its own 'uniquifier', to make...
July 8, 2016 at 8:07 am
Phil Parkin (7/8/2016)
SQL!$@w$0ME (7/8/2016)
Does the clustered key column(s) has to be NOT NULL/UNIQUE as best practice?
Yes. Otherwise SQL Server has to create its own 'uniquifier', to make the rows unique....
July 8, 2016 at 6:36 am
Yes, but that's only if queries contain such sensitive information as passwords. If no queries ever filter on plain text passwords (which they damn well shouldn't), then those can't expose...
July 8, 2016 at 4:25 am
Are you appending multiple backups to the same file?
With the options there (NOINIT), if that backup file already exists, SQL appends the backup to the existing file, resulting in a...
July 8, 2016 at 2:52 am
patrickmcginnis59 10839 (7/7/2016)
I'm just wondering if your code might also contain the same sort of race condition pointed out by Gilamonster?
Yes it can.
Two sessions start, one runs the update,...
July 7, 2016 at 8:10 am
sunita2912 (7/7/2016)
select name, object_name(object_id) As ObjName,*from tempdb.sys.objects
where name like '#%'
Is going to give temp table, table variables, cached temp table shells and internal work tables, not just the...
July 7, 2016 at 8:06 am
Step 1 is completely unnecessary. Recovery model changes are online operations. You don't need to disconnect users and if you set the DB to read_Only, you won't be able to...
July 7, 2016 at 8:05 am
Well, like any changes, you don't want to make it slap in the middle of the business day. Same as any changes, do them at the quietest time.
July 7, 2016 at 6:35 am
DO NOT script the data!
First because you'll get exactly these errors on larger tables. Second because the resultant script will probably crash Management Studio when you go to run...
July 7, 2016 at 6:17 am
Definitely enable Optimise for Ad-hoc workloads with figures like that. It's a safe setting to turn on in general.
Are those queries parameterised? If not, it may be a good idea...
July 7, 2016 at 3:05 am
Shut down SQL, open master.mdf in my hex editor. Scribble zeros over places in the first ~100k of the file. Save. Start SQL, watch SQL fail to start.
July 6, 2016 at 1:28 pm
sunita2912 (7/6/2016)
IF NOT EXISTS (SELECT 1
FROM u_apppreferences
WHERE NAME = @name
AND val = @val
)
BEGIN
INSERT INTO u_apppreferences (NAME,Val)
VALUES (@name,@VAL)
END
ELSE
PRINT 'Name and Val exists';
As with the OP's original code, that is prone to...
July 6, 2016 at 1:17 pm
If the column is a varchar, which you said it is, then what you compare against it should be a string, hence in quotes. If you compare a string and...
July 6, 2016 at 11:16 am
Viewing 15 posts - 2,821 through 2,835 (of 49,571 total)