Viewing 15 posts - 856 through 870 (of 13,460 total)
SQL_Student (8/29/2016)
Thanks I tried that, but if user has sysadmin role he still has access to the db 🙁
in general, If someone has sysadmin access, you cannot restrict access to...
Lowell
August 29, 2016 at 5:34 am
when the view is actually compiled, the wild card is expanded to the list of actual column names in the compiled version of the view;that's to avoid dynamically having to...
Lowell
August 28, 2016 at 5:57 am
there's a number of powershell scripts that use SMO to script out all objects as well;
you could easily set something up to call that on a regular basis.
I'll see if...
Lowell
August 23, 2016 at 11:23 am
tobypaul509 (8/23/2016)
I need to purchase a tool for my...
Lowell
August 23, 2016 at 9:04 am
ChrisM@Work (8/23/2016)
JasonClark (8/23/2016)
CREATE TRIGGER [TR_ProtectCriticalTables]
ON DATABASE
FOR
DROP_TABLE
AS
DECLARE @eventData XML,
@uname NVARCHAR(50),
...
Lowell
August 23, 2016 at 8:54 am
GilaMonster (8/22/2016)
Try filtering on database_id, or is the db_id the id of the connection rather than the table?
doh simple and obvious;
the database_id =2 , regardless of what database context that...
Lowell
August 22, 2016 at 9:52 am
whenever the difference between estimated rows and actual rows is off by a lot(order of magnitude or more,
it usually means the statistics are out of date enough to adversely affect...
Lowell
August 17, 2016 at 7:15 am
it's an easy fix.
change the NOINIT TO INIT
that is append vs create/overwrite.
mwinn (8/11/2016)
Lowell
August 11, 2016 at 2:04 pm
the data is the data. don't modify the data, modify the query that is exporting to csv.
if you use SSIS, you can modify it to export everything with double...
Lowell
August 8, 2016 at 8:34 pm
i think you want something like this:
SELECT
'exec sp_rename ''' + QUOTENAME(Table_Name) + '.' + QUOTENAME(REPLACE(COLUMN_NAME,'''','''''')) +
''', ''' + QUOTENAME(LOWER(REPLACE(COLUMN_NAME,'''',''''''))) + ''', ' + '''COLUMN'';'
FROM
Information_Schema.[COLUMNS]
WHERE COLUMN_NAME <>...
Lowell
August 8, 2016 at 9:04 am
any object name with a single quote in it needs to be escaped in a command:
exec sp_rename '[table_name].[Rec''d 2007]', '[rec''d 2007]', 'COLUMN';
Lowell
August 8, 2016 at 8:47 am
TheSQLGuru (8/7/2016)
Lowell
August 7, 2016 at 2:15 pm
Does the existence of duplicates actually break anything, or is it just a cleanup task because the .net application doesn't check for duplicates before adding the data? the urgency is...
Lowell
August 7, 2016 at 1:28 pm
wow Line 74851
thats a huge proc to debug.
at that size, it must be doing a zillion things, that's rough.
Lowell
July 30, 2016 at 6:37 am
i think it would be like this, right?
DECLARE @TermToTweak VARCHAR(30) = 'lowell@fake.com'
DECLARE @cmd VARCHAR(MAX) = 'EXECUTE AT(LinkedServer,''update P
set P.Email1 = ''' + @TermToTweak + '''
from MyDatabase.dbo.Profiles P
JOIN MyDatabase.dbo.Complaints C on...
Lowell
July 29, 2016 at 1:26 pm
Viewing 15 posts - 856 through 870 (of 13,460 total)