Viewing 15 posts - 6,826 through 6,840 (of 13,460 total)
just the methods you probably already know:
SELECT INTO MyTABLE_bak FROM MyTABLE, or if you want to put them in a different database, SELECT INTO SELECT INTO SpecialDatabase.dbo.MyTABLE_bak FROM...
Lowell
September 2, 2011 at 11:00 am
well i found a post stating the obvious: adding debug stuff like PRINT statements would slow down a proc, and forgetting to sue using SET NOCOUNT ON to avoid extra...
Lowell
September 2, 2011 at 9:13 am
David Paskiet (9/2/2011)
Lowell
September 2, 2011 at 9:08 am
can you get an execution plans of the same proc with and without the huge comment blocks? that would be where i'd look first, i think...there's GOt to be ...
Lowell
September 2, 2011 at 9:03 am
comments are ignored by SQL server completely...it's much more likely that because you edited the procedure, it was recompiled,a nd the recompilation made a better plan, which executes faster than...
Lowell
September 2, 2011 at 8:45 am
paul88 (9/2/2011)
Cheers Lowell, that allowed me to do it a good bit quicker than manually changing each one, thanks
glad i could help!
you can try to get fancy, and do something...
Lowell
September 2, 2011 at 8:38 am
erkan.erbil (9/2/2011)
Appserver Logs showed...
Lowell
September 2, 2011 at 8:29 am
just to confirm and expand on what Howard said...
as soon as you change the ansi setting shown in my screenshot below, and in a new window...
if you perform some updates...
Lowell
September 2, 2011 at 8:21 am
you'll have to script each view out and issue teh ALTER VIEW statement for each;
but you can use the metadata to find them and script them out from there:
select *...
Lowell
September 2, 2011 at 8:11 am
by are not distinct you mean duplicates?
you can use row_number() function or group by...having count(*) > 1
SELECT * FROM
(select row_number() over (partition by ColumnList Order By ColumnList) AS RW,
ColumnList...
Lowell
September 1, 2011 at 2:18 pm
jimmycjen (9/1/2011)
Lowell,When I ran the (first) SQL statement in a specific database, for some reason, it doesn't show all the users.
that might be normal, if domain users get their access...
Lowell
September 1, 2011 at 2:00 pm
well, it's one thing to *think* he ahs db_owner, and another one to check.
run these queries in the database in question:
select
userz.name,
userz.type_desc,
decripz.name as _member_of_this_role
from sys.database_principals userz
inner join sys.database_role_members rolez
on...
Lowell
September 1, 2011 at 12:04 pm
Express12 (9/1/2011)
Need t-sql script to backup a sql 2005 sp2 database with compression.This is not working on SQL 2005:
BACKUP DATABASE myDatabase TO DISK = 'C:\BackupFolder\myDatabase.BAK' WITH COMPRESSION
compression was...
Lowell
September 1, 2011 at 11:19 am
is there a trigger on the table that is inserting into an audit table somewhere? maybe it's permissions on the Triggers Audit table that the user has no permissions for.
Lowell
September 1, 2011 at 10:11 am
the order of the columns are important.
i hate the pseudocode of col1,col2, so lets switch to a little more detailsed example.
suppose you have an index like this:
CREATE INDEX IX_OrdersTable ON...
Lowell
September 1, 2011 at 10:09 am
Viewing 15 posts - 6,826 through 6,840 (of 13,460 total)