Viewing 15 posts - 16 through 30 (of 50 total)
Here's a solution that I think does what you're looking for.
For an explanation of what's going on here, I recommend reading through this thread (especially GSquared and RBarryYoung's...
September 10, 2010 at 3:06 pm
What role do these users have?
Here's a relevant discussion from the msdn forums: http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/c562ef25-3157-4068-8957-9095e31b1ffc
If they're a member of any of the roles mentioned in that post, you'll have to modify...
September 9, 2010 at 3:04 pm
Is there a specific problem with using the backupset table?
At any rate, check out RESTORE HEADERONLY, it returns a BackupSize column.
http://msdn.microsoft.com/en-us/library/ms178536(SQL.90).aspx
August 20, 2010 at 12:51 pm
Whatever the job does, stick that code in the final Begin-End block where I have "Your Code Goes Here".
It'll only actually execute when it meets the date criteria.
Another route would...
July 30, 2010 at 8:49 am
I would schedule the job to run every day, and if it's an 'invalid' day then exit the job, and if it's a 'valid' day, actually do the work you...
July 29, 2010 at 12:38 pm
I think I understand your requirements, but some sample data and expected output would have helped. Either way, I took a stab at it.
create table #Lookupproducts (NDC int, Groupid...
July 8, 2010 at 10:28 am
Take a look at SET ROWCOUNT:
http://msdn.microsoft.com/en-us/library/aa259189(SQL.80).aspx
It's a deprecated feature, but a very useful one.
July 7, 2010 at 12:50 pm
Something like this?
select
id
,max(case when orderid = 1 then dns else null end) as 'orderid1'
,max(case when orderid = 2 then dns else null end) as 'orderid2'
,max(case when orderid = 3 then...
July 2, 2010 at 9:54 am
It sounds like you need to specify WITH REPLACE on your restore operation.
June 21, 2010 at 1:16 pm
You can use dynamic sql to accomplish this:
declare @my_LinkedServer varchar(100)
declare @sql varchar(255)
set @my_LinkedServer = 'Server1'
set @sql = 'select count(brands) from [' + @my_LinkedServer + '].[Linkedserverlocal].[dbo].[brands]'
print
June 14, 2010 at 9:18 am
Here's an example with some trivial test data:
create table #timberpermits (permitnumb char(3), Acres float)
insert into #timberpermits
select 'K-7', 4082.43477183 union all
select 'K-8', 3247.35429133 union all
select 'K-9', 2190.63280009 union all
select 'K9-', 1575.83025560...
June 8, 2010 at 2:31 pm
If the @JOBID parameter has the correct job_id, this should work:
exec msdb.dbo.sp_start_job @job_id = @JOBID
June 8, 2010 at 1:19 pm
Hmm.. I got your command to fit. Are you typing it in manually or are you copy/pasting it in?
Copy/paste should work... but the window doesn't let you scroll left-to-right,...
May 21, 2010 at 7:54 am
I've had a similar need in the past, and what works for me is mapping a command to a keyboard shortcut.
In SSMS, go to Tools > Options, and click...
May 20, 2010 at 3:21 pm
Viewing 15 posts - 16 through 30 (of 50 total)