Forum Replies Created

Viewing 15 posts - 1 through 15 (of 167 total)

  • Reply To: Fully Qualifying Server

    So is this possible

    set @execSrvQuery = (

    select top(1) Replace(d.SQLServerName+'\'+ s.SQLInstanceName+','+Convert(varchar(10),TCPPortNum),',0',',1113') as SQLInstanceName

    FROM Catalog.eAudit.DatabaseServerSQLInstance s

    inner join [Catalog].[eAudit].[DatabaseServer] d on d.DatabaseServerID=s.DatabaseServerID

    where s.SQLInstanceName like '%KCW%' )--and s.SQLInstanceName not like '%SSAS%'

    union

    Select @@ServerName)

    EXEC [@execSrvQuery].[msdb].dbo.sp_update_job @job_name...

  • Reply To: Disabling backup Jobs

    Here is what I changed it to, but still getting that error.

    USE MSDB;

    GO

    DECLARE @job_name nvarchar(max)

    DECLARE @enable int

    create table #JobsToDisableEnable

    (

    job_name nvarchar(max),

    enable int

    )

    DECLARE @Query varchar(1000)

    SET @Query ='BULK INSERT #JobsToDisableEnable FROM "G:\SQL_Jobs\DisableEnableJobs\joblist.txt"

    WITH(

    ROWTERMINATOR =...

  • Reply To: Disabling backup Jobs

    I noticed that it is using the value from sp_update_job, how would i get it to use the values in the FROM #JobsToDisableEnable? Like its doing enabling all and disabling...

    • This reply was modified 2 years, 7 months ago by  cbrammer1219.
  • Reply To: Disabling backup Jobs

    Here's what I have come up with, but I get an error.

    Msg 14294, Level 16, State 1, Procedure sp_verify_job_identifiers, Line 25 [Batch Start Line 2]

    Supply either @job_id or...

  • Reply To: Disabling backup Jobs

    It is manual, so when deployments are done, I would run it to disable them, then once deployment is done, I would run it to re-enable those disabled jobs in...

  • Reply To: Disabling backup Jobs

    I wish I could use a table but can't create tables on the servers, I have to read the Job name from a text file, which the jobs are the...

  • Reply To: Disabling backup Jobs

    Cant use those PS features, not allowed to install on servers

  • Reply To: Disabling backup Jobs

    I see that one but need to put the names of jobs in a text file, cause that will enable and disable all jobs, some jobs I don't want to...

  • Reply To: DateDiff for only @p_start_date and @p_enddate

    I am trying to get the hours difference.

  • Reply To: Sum days for fiscalyear

    When I use your code I get errors all over , states sum function requires 1 arg, and doesn't recognize OBSERV_DATE, yes I figured to let the report do the...

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Sum days for fiscalyear

    I've attached a screen shot of the table definitions.

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Sum days for fiscalyear

    The report is displaying the data like this. see attached..sorry

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Sum days for fiscalyear

    So to get it to show them day 1 of each month, totals and day 2, day 3 do I need to group by something special within the report? because...

  • Reply To: Sum days for fiscalyear

    The data returned doesn't look sum it properly from what I am seeing in the data, for example oct, nov dec, jan isn't showing data as in the attachment.

  • Reply To: Sum days for fiscalyear

    We don't have a table for dates, this is a poorly designed database. I have to figure the fiscal year based off observ_date it goes oct through sept

Viewing 15 posts - 1 through 15 (of 167 total)