SQL Advisor Job failed...

Hi ,
I have installed the Oracle RDBMS 10g and Enterprise Manager as well.....
I try to run the SQL Access Advisor as user SYS but it constantly fails...
The error messages are as follows.....
ORA-13605: Task or Object SQLACCESS8165579 does not exist...
Details ORA-06512: in "SYS.PRVT_ADVISOR", line 2676 , ORA-06512: in "SYS.DBMS_ADVISOR line 247 , ORA-06512: line23 does not exist for the current user....
So , do i have to run the SQL Access Advisor with another user or should I first grant some specific-in this situation which are- privileges to user SYS...????
Regards,
Simon

Something else....
I have noticed in the the Job Scheduler window that the following pl/sql block has been executed....
DECLARE
taskname varchar2(30);
task_desc varchar2(256);
task_or_template varchar2(30);
task_id number;
wkld_name varchar2(30);
saved_rows number;
failed_rows number;
num_found number;
BEGIN
task_id := 0;
saved_rows := 0;
failed_rows := 0;
taskname := 'SQLACCESS6026890';
task_desc := 'SQL Access Advisor';
task_or_template := 'null';
wkld_name := 'SQLACCESS6026890_wkld';
/* Create Task */
dbms_advisor.create_task(DBMS_ADVISOR.SQLACCESS_ADVISOR,task_id,taskname,task_desc,task_or_template);
/* Reset Task */
dbms_advisor.reset_task(taskname);
/* Create Workload */
select count(*) into num_found from user_advisor_sqlw_sum where workload_name = wkld_name;
IF num_found = 0 THEN
dbms_advisor.create_sqlwkld(wkld_name,null);
END IF;
/* Reset Workload */
dbms_advisor.reset_sqlwkld(wkld_name);
/* Link Workload to Task */
select count(*) into num_found from user_advisor_sqla_wk_map where task_name = taskname and workload_name = wkld_name;
IF num_found = 0 THEN
dbms_advisor.add_sqlwkld_ref(taskname,wkld_name);
END IF;
/* Set Workload Parameters */
dbms_advisor.set_sqlwkld_parameter(wkld_name,'ACTION_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'MODULE_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'SQL_LIMIT',DBMS_ADVISOR.ADVISOR_UNLIMITED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'ORDER_LIST','PRIORITY,OPTIMIZER_COST');
dbms_advisor.set_sqlwkld_parameter(wkld_name,'USERNAME_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'VALID_TABLE_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'INVALID_TABLE_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'INVALID_ACTION_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'INVALID_USERNAME_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'INVALID_MODULE_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'VALID_SQLSTRING_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'INVALID_SQLSTRING_LIST',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_sqlwkld_parameter(wkld_name,'JOURNALING','9');
dbms_advisor.set_sqlwkld_parameter(wkld_name,'DAYS_TO_EXPIRE','30');
dbms_advisor.import_sqlwkld_sqlcache(wkld_name,'REPLACE',2,saved_rows,failed_rows);
/* Set Task Parameters */
dbms_advisor.set_task_parameter(taskname,'EXECUTION_TYPE','FULL');
dbms_advisor.set_task_parameter(taskname,'MODE','COMPREHENSIVE');
dbms_advisor.set_task_parameter(taskname,'STORAGE_CHANGE',DBMS_ADVISOR.ADVISOR_UNLIMITED);
dbms_advisor.set_task_parameter(taskname,'DML_VOLATILITY','TRUE');
dbms_advisor.set_task_parameter(taskname,'ORDER_LIST','PRIORITY,OPTIMIZER_COST');
dbms_advisor.set_task_parameter(taskname,'WORKLOAD_SCOPE','FULL');
dbms_advisor.set_task_parameter(taskname,'DEF_INDEX_TABLESPACE',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_task_parameter(taskname,'DEF_INDEX_OWNER',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_task_parameter(taskname,'DEF_MVIEW_TABLESPACE',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_task_parameter(taskname,'DEF_MVIEW_OWNER',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_task_parameter(taskname,'DEF_MVLOG_TABLESPACE',DBMS_ADVISOR.ADVISOR_UNUSED);
dbms_advisor.set_task_parameter(taskname,'CREATION_COST','TRUE');
dbms_advisor.set_task_parameter(taskname,'EVALUATION_ONLY','FALSE');
dbms_advisor.set_task_parameter(taskname,'JOURNALING','9');
dbms_advisor.set_task_parameter(taskname,'DAYS_TO_EXPIRE','30');
/* Execute Task */
dbms_advisor.execute_task(taskname);
END;In the above , the create task command is under comments.....
But if i uncomment this , and execute it in SQL*PLUS as user SYS , then I get the following errors...
ORA-13600:error encountered in Advisor string
ORA-13635:The value provided for parameter string cannot be converted to a number. The parameter string is "ADJUSTED_SCALEUP_GREEN_THRESH"
ORA-06512: in "SYS.PRVT_ADVISOR", line 3902
ORA-06512: in "SYS.DBMS_ADVISOR", line 102
ORA-06512: in line 21
Whowwww!!!
What can I get rid of these errors?????
Thanks , a lot for time and interest!!!
Simon

Similar Messages

  • Access Advisor Job fails every time?

    hi
    i made a tuning set and tried to get some recomondations for tuning by starting a sql access advisor job.
    After i submited the job i see unter the "oracle sheduled" my failed job. as error message i get the following information if i click the button for showing the job defintion:
    "ORA-13605: The specified task or object string does not exist for the current user."
    and indeed the user name is shown empty. how can i set a user for an access advisor job? or why doesn't that happen automatically?
    can anyone help me?

    This turned out to work for me, too! It was nothing to do with network switch configuration, per se-- or at least I didn't have to change anything on my switch to fix it. Instead I tried fusiongroup's method of getting into the command-line before the WinPE
    boot hit the "Preparing network connections" step, and I repeatedly ipconfig /renewed until suddenly the TS reached the next step of the sequence instead of failing out.
    I also made this an "Available" sequence instead of a "Required" sequence, which I think buys you a little time in terms of offering a GUI in WinPE for the sequence, instead of just trying to run it.
    One last thing: I was running this on a Workgroup machine that is not joined to our domain; I had followed another tutorial to get the client installed on it even though it's outside the domain. Prior to trying the command-line fix fusiongroup gave, I also
    went into Assets and Compliance in Configuration Manager and right-clicked the machine in the list of devices, and found that I had to "Approve" it for management by SCCM. Don't know if that helped as well.
    Sylvie Andrews

  • SQL Agent Job failing - not using credentials in the config file for Data source

    Hi
    We have an SSIS pkg, that is secheduled as SQL Agent job using proxy account. The pkg contanins data source for connecting different SQL servers and the proxy account do not have access to the external DBs. The data source credentials are stored in the Config
    file.
    Why the job is not using the credentials in the config file and try to use the proxy account and failing.
    Do the proxy account need access to all the external dbs in the pkg, and then what is the purpose of the config file.
    I am sorry, i am not SSIS person trying to understand. If any one can explain tha will be great!!
    Thank you!
    VR

    Please take a look at these URLs:
    Schedule a Package by using SQL Server Agent
    SSIS package does not run when called from a SQL Server Agent job step
    Cheers,
    Saeid Hasani
    Database Consultant
    Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
    [My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
    [Twitter] [Facebook] [Email]

  • SQL Agent Job Fails To Run A SSIS Package

    Hi,
    I have a SSIS Package which basically truncates the table and re-loads it from an excel file .The job runs fine if i run it manually on visual studio.However, i try to shcedule a SQL Agent job and it fails with the following error
     Description: The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.  An OLE DB record is available.  Source: "Microsoft
    OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  End Error  Error: 2014-10-22 14:47:41.15     Code: 0xC001002B     Source: Package1 Connection manager "Excel
    Connection Manager 1"     Description: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. 
    I am exactly not sure what it means?
    Can someone please help me with any suggestions on this.
    Thanks.

    Thanks for trying that option . It looks like there is an issue with the driver . Can you try to install/uninstall the driver once again from http://www.microsoft.com/en-us/download/details.aspx?id=13255.
    You can try this URL , where he has the similar problem 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8a40d329-0611-44e2-ae51-3bd9b0901754/ssis-the-requested-ole-db-provider-microsoftaceoledb120-is-not-registered?forum=sqlintegrationservices
    Please mark this as answer if this helps to solve your problem

  • SQL Server jobs fail if I signout the Remote Desktop connection

    I have some SSIS jobs running in the production server which we usually take that server by Windows' Remote Desktop Connection to monitor the jobs. The problem in our case is If we sign out the server in remote connection, all the sql server jobs getting failed
    until we reestablish a remote connection but the jobs work fine if we close the remote connection explicitly by the (x) mark on the Remote Connection interface
    Any idea on this issue

    always same error like the following
    Code: 0xC0014009     Source: Connection manager "Invoice"     
    Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.  End Error  Error: 2015-01-12 08:00:05.26     Code: 0x0000020F     Source: DFT GetData  [2]  
    Description: The AcquireConnection method call to the connection manager Invoice failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error:
    2015-01-12 08:00:05.26     
    Code: 0xC0047017     Source: DFT GetData SSIS.Pipeline     
    Description:  Data failed validation and returned error code 0x80004005.  End Error  Error: 2015-01-12 08:00:05.27     
    Code: 0xC004700C     Source: DFT GetData SSIS.Pipeline     
    Description: One or more component failed validation.  End Error  Error: 2015-01-12 08:00:05.28     
    Code: 0xC0024107     Source: DFT GetData      
    Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  8:00:00 AM  Finished: 8:00:06 AM  Elapsed:  5.678 seconds.  The package execution
    failed.  The step failed.

  • [SQLSTATE 42000][Error 4834] - SQL Agent Job failing

    Hello, 
    I have started getting the below error message on a bulk insert job that has been running over several months. 
    Error is:
    Executed as user: domain\svc_sql. You do not have permission to use the bulk load statement. [SQLSTATE 42000] (Error 4834).  The step failed.
    Domain\svc_sql is also service account for SQL Server. Both the SQL server and SQL agent are running under this account and it has sysadmin and bulkadmin privileges.
    Bulk insert is from csv file in a folder for which domain\svc_sql has full permission. 
    I've now ran out of ideas. 
    Could anybody advise?
    Many thanks, 
    Mohan

    Hi Mohan,
    According to the error message, it can be caused by that when SQL Server Agent performs EXECUTE AS USER, you are by default sandboxed into the database, and therefore you don't have access to server-level tasks.
    To work around the issue, as Praveen’s post, you can set the database TRUSTWORTHY to ON, however it might cause some security issues. For more details, please review this article:
    Giving Permissions through Stored Procedures Ownership Chaining, Certificates and the Problematic EXECUTE AS.
    Personally, I recommend you create the bulk insert job as a CmdExec job which uses SQLCMD to run scripts. For more information about CmdExec job, please review this article:
    Create a CmdExec Job Step.
    There is also a discussion about the error 4834 in the following thread.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/48621876-11a0-468c-95b4-2a682f0134aa/bulk-insert-not-working-through-an-agent-job
    Thanks,
    Lydia Zhang

  • SQL Server job failed. The Job was invoked by Schedule 11 (NAV Backup 1). The last step to run was step 1 (Subplan_1)

    Date 07-01-2014 10:00:00 PM
    Log Job History (NAV Backup 1.Subplan_1)
    Step ID 1
    Server NAVSRV
    Job Name NAV Backup 1.Subplan_1
    Step Name Subplan_1
    Duration 00:02:26
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    1122

    About your question on How and Who changed it, i told that nobody changed it. I found in this way.
    1122
    I also Saw the plan and the path of Database and database log was ok , i mean PHARMANEXT_LOG_95ABA2F6-DC67-4CFC etc...
    was exactly like in the C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
    Maybe is something wrong with my backup script, but i dont think so because before 23 of december
    everithing was ok. After this date it failed.
    Anyway check this script of "Remove SQL log" , the one that you think is a culprit:
    DECLARE @name VARCHAR(50)
    DECLARE @fileName VARCHAR(256)
    DECLARE db_cursor CURSOR FOR 
    SELECT name 
    FROM master.dbo.sysdatabases 
    WHERE name NOT IN ('master','model','msdb','tempdb') 
    OPEN db_cursor  
    FETCH NEXT FROM db_cursor INTO @name  
    WHILE @@FETCH_STATUS = 0  
    BEGIN  
    SET @filename = @name + '_log' 
    Exec ('Use [master] alter database [' + @name + '] set recovery simple')
    Exec ('Use [master] alter database [' + @name + '] set recovery FULL')
            Exec ('Use [' + @name + '] DBCC SHRINKFILE ("' + @filename + '",1)')
           FETCH NEXT FROM db_cursor INTO @name  
    END  
    CLOSE db_cursor  
    DEALLOCATE db_cursor
    go
    Hello,
    You have created a cursor which will take all user databases and change recovery model to Simple and then to full what this will cause it will break the log chain and you might loose your RPO and RTO.This operation truncates the log .Please stop this job
    immediately.It is worst you can do to your Database recovery and availability.After this you are trying to shrink .
    As pointed out it is seriously not advised to shrink data file.And if you have proper trn log backup it manages the growth of log file
    Hope this helps
    Keep looking for any such activity which might change anything in your database
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Sql Agent Job Failed after changing job name to sa Error(The job owner does not have access )

    I changed  job owner to sa and it worked well, But now it fails saying job owner does not have sever access and shows job owner as previous owner Name even after it changed to sa?
    Help......

    EXEC msdb.dbo.sp_update_job @job_id=N'7d4d4040-b79c-4022-9d19-e449497ab60e', 
    @owner_login_name=N'sa'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SQL Agent Job fails due to excel import

    I  have SQL SERVER 2012 SP 1.  I have a package which imports a generic spreadsheet into a import table and then does does other stuff with it.
    I can happly run the SSIS package through BIDS but fails when I try and run it though SQL agent.
    with errors such as Microsoft.ACE.OLEDB.12.0.  Provider is not registered on this machine.
    Within the SSIS I use the Excel connection manager and have modifed the string to
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\FileDropTest\Fusion.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;IMEX=1";
    and re deployed and still get the same issue. 
    I then enabled xp_cmdshell and tried from TSQL
    DECLARE @Qry VARCHAR(8000)
    SELECT @Qry = 'dtexec /FILE "D:\SSIS\export\Fusion.dtsx"'
    EXECUTE xp_cmdshell @Qry
    and got
    output
    Microsoft (R) SQL Server Execute Package Utility
    Version 11.0.5058.0 for 64-bit
    Copyright (C) Microsoft Corporation. All rights reserved.
    NULL
    Started:  5:49:25 PM
    Error: 2015-02-09 17:49:25.43
       Code: 0xC001000E
       Source: Fusion
       Description: The connection "{3076028A-D7D9-4432-AADB-CAC6D9AD5995}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
      As a different approach it was recommended to use OLEDB however within BIDS I the connection tests fine but when I run it though BIDS it fails
    [OLE DB Source [79]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "D:\FileDropTest\Fusion.xlsx" failed with error code 0xC0202009.  There may be
    error messages posted before this with more information on why the AcquireConnection method call failed.
    For refrence I ve also set the delay to true.
    I'm a bit stuck as I thought importing a spreadsheet being Microsoft product ;) would be fairly easy .  Any Help on this matter would be great.

    If your source Excel file is .xls, it should successfully import it. However in your case Excel file is .xlsx hence it fails.
    >> I can happly run the SSIS package through BIDS but fails when I try and run it though SQL agent.
    with errors such as Microsoft.ACE.OLEDB.12.0.  Provider is not registered on this machine
    Your local server where you run the package in BIDS have the 32 Bit ACE OLEDB 12.0 driver installed correctly.
    But the target server where you run the package thorugh SQL Agent has no correct driver. Please download
    32 bit Microsoft Access Database Engine 2010 Redistributable and install it in Target server.
    >> I then enabled xp_cmdshell and tried from TSQL and got errors "Connections collection when the specific connection element is not found"
    Please look at the connection managers in your package. There has to be some connection manager where name is missing. This may happen if you copy paste connection from same or another ssis package.
    -Vaibhav Chaudhari

  • Sql server job failing some times and suuccessful some time, even when it should run succesful

    Hi Experts,
    I got stuck with some issue....please help me resolve
    1.I created job -> calling SSIS package
    2. In SSIS package ->
    (I) firstly i have zip file container
    (II)second i have Execute process taskk editor - here i am doing unzip - in side On query cancel i have package failure if correpted file comes.
    (III) loading into table using bulk insert
    Problem:
    When i run the job it's working fine most of the times.
    But some time job executing still Execute Process taskk editor and after that job is getting canceld as follows"The job was stoped prior to completion by (unknown)" even through i have proper file(which is gettng unzip manualy).
    Please help me to resolve this issue...

    What is the SQL  version you are on?
    Is this applicable for you?
    http://support.microsoft.com/kb/922527
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • SQL server Job failed as null values were tried to be inserted.

    How can i make my job run without failure by making the stored procedure that the job runs to skip a null value?

    This is part of the sp which is causing a problem. 
    Delete from dbo.[tablename] Where Special = 0
    Insert Into dbo.[tablename]
      Select TimekeeperID as EmpID, IsNull(networkID, left(firstname, 1) + left(lastname, 7)) as NetID,
      LastName + ', ' + CASE WHEN IsNull(Nickname, '') = '' THEN FirstName ELSE NickName END as EmpName,
      CASE When Location = 'Brussels' Then '#701-' + Right(workPhone1, 3) Else
        Case Location When 'DC' THEN  '#10-' When 'ACPF' THEN  '#15-' When 'Phoenix' THEN  '#20-'
        When 'CC' THEN  '#50-' When 'NY' THEN  '#60-' When 'LA' THEN '#30-' When 'UK' THEN '#40-'
        When 'Brussels' THEN '#701-' When 'Chicago' THEN  '#25-' ELSE '' END 
        + Right(workPhone1, 4) END as Extension,
      isnull(p.email, '') as Email,
      isnull(Location, '') as Office, roomNumber as Room, 0 as Special
      from SJCentralDB.dbo.[ALLPEOPLE_Kiru] p
      left outer join [tablename] u on u.netid = IsNull(networkID, left(firstname, 1) + left(lastname, 7))
      where u.netid is null and estatus <> 'Terminated' and lastname + firstname <> 'AlvarezKevin' 
      --and TimekeeperID <> ''
      --and p.email = '[email protected]'
      Order by EmpName
    SO what i want is that, if the [TimekeeperID] does not have a value, so i dont want that raw to be inserted. 

  • Notify more than 1 operator in a SQL Agent job

    Hi Forum,
    is there a way to notify more than one operator if a SQL Agent job fails?
    TIA
    Alex

    Hello Alex,
    If you are using a "maintenance plan" task "Notify operator" you can select several operators from a list.
    In a SQL Server Agent job itself you can only add several operator for "warnings", but for the notifications like "finished" just one.
    Olaf Helper ----------- * cogito ergo sum * errare humanum est * quote erat demonstrandum * Wenn ich denke, ist das ein Fehler und das beweise ich täglich http://olafhelper.over-blog.de

  • LcsCDR & QoEMetrics Purge and Usage Summary SQL Agent Jobs

    Hello.
    On our SQL instance that hosts the LcsCDR & QoEMetrics databases I have the following SQL Server Agent Jobs:
    LcsCDR_Purge
    LcsCDR_UsageSummary
    QoEMetrics_Purge
    QoEMetrics_UsageSummary
    I'd like to know if anyone else has these same jobs on their instances as it's unclear looking at the job descriptions, when they were created, and the code they run if these are part of the core Lync system or something that has been set up randomly
    afterwards.
    One thing I do know is that these jobs don't work correctly when you use database mirroring. I will elaborate on this if/when I can find out any more information about them first.
    Thanks

    Thank you for the reply.
    The problem with these jobs is that when they attempt to run against a database which is a mirror, it causes the job to fail. That would not seem to be a big deal right, except our policy (and many other SQL shops I imagine) is to send e-mail notifications
    each and every time a SQL agent job fails on any server, not just those associated with Lync.
    As it stands these jobs are not configured on either the principal or mirror server to notify anyone as I’d get an e-mail every hour on the hour from the mirror server telling me that a job has failed  (even though it didn’t actually need to do anything
    ) giving the impression something is wrong somewhere. This is quite a common trap to fall into with SQL Agent jobs and database mirroring.
    Remember that because as Lync uses automatic failover either server could be the mirror at any given time so there is no mileage in setting the e-mail notifications on just the server that is currently the principal.
    What this job should do then is when it attempts to run on the mirror, check if it’s the mirror first and if it is then do nothing instead of failing each time.  This will enable e-mail notifications to be set up on the jobs on both servers, so when
    the job fails we know there is potentially a genuine problem to be investigated.
    Each job contains two steps, I’ll use the QoEMetrics_UsageSummary as the example.
    The code in step 1 is this, which causes the job to error out if it is attempting to run against the mirror.
    declare @_MirroringRole int
    set @_MirroringRole = (
    select mirroring_role
    from sys.database_mirroring
    where database_id = DB_ID('QoEMetrics')
    if (@_MirroringRole is not NULL and @_MirroringRole = 2) begin
    raiserror('Database is mirrored', 16, 1)
    end
    else begin
    print ('Database is not mirrored')
    end
    I re-wrote this job to run in one-step like this, which runs from the master database, which as I mentioned above doesn’t make the job error out when it realises it’s trying to run against a mirror.
    DECLARE @_MirroringRole INT
    SET @_MirroringRole = ( SELECT mirroring_role
    FROM sys.database_mirroring
    WHERE database_id = DB_ID('QoEMetrics'))
    -- if this is not a mirrored database or it's the principal, attempt to run usage summary op
    IF (@_MirroringRole IS NULL OR @_MirroringRole = 1)
    BEGIN
    DECLARE @_Sql NVARCHAR(4000)
    SET @_Sql =
    'USE [QoEMetrics];
    DECLARE @_UpdatingSkipped INT
    EXEC dbo.RtcRegularMaintainDatabase @_UpdatingSkipped = @_UpdatingSkipped output'
    EXEC (@_Sql)
    END
    ELSE -- if the database is a mirror, don't do anything
    BEGIN
    PRINT 'there is nothing to do, the database is a mirror'
    END
    The same logic can be applied to the other 3 jobs and I was intending to suggest it as a connect item, except there doesn’t seem to be a section for Lync so I will contact product support and see what they think.
    Thanks again.

  • Sql server agent job failing to connect excel connection manager of SSIS package by 32-bit mode run time

    I am unable to succeed with sql agent job, I am trying to execute the SSIS package through sql agent job by ticking 32 bit runtime check box in 64 bit machine , even it does not worked..
    could any one helpme on this?
     Source: Excel Load Connection manager "Excel Connection Manager"    
    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040154.  An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class
    not registered".  End Error   TS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may be error
    messages posted before this with more information on why the AcquireConnection method call failed.  End...  The package execution fa...  The step failed.

    Hello Keerthi,
    Can you please modify settings and set delay validation for Excel connection manager? I think its validating connection and failing because it might be picking that from some variable.
    Alternatively, please run package using below and see what happens.
    EXEC master..xp_cmdshell 'DTEXEC.exe /SQL "Folder\Package" /SERVER Servername'
    I will recommend you to follow steps in below link.
    http://www.sqlhammer.com/blog/running-ssis-packages-in-32-bit/
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • SQL Server Agent Job Failing on Job Step

    Hi,
    Firstly, apologies if this post has been made in the wrong group.  Running SQL Server 2012.  I'm attempting to add a SQL Server Agent Job which calls a stored procedure that sends a Database Mail message.  The SQL Server and SQL Server Agent
    both run under the NT AUTHORITY\NETWORK SERVICE account.  The Database Mail service has been enabled, and a public profile created.  When running the stored procedure manually, I receive no errors - everything runs as expected and I do receive an
    email containing the expected information.
    I've created the job, job step, job schedule, attached the schedule to the job, and assigned the job to server, all using T-SQL without error.  I've also enabled the mail profile on the SQL Server Agent, and I know that part is working because when
    the job fails, I get an email notification of the failure.
    I've checked the command text in the job step and parsed it within the SQL Job Step Edit window to confirm, it shows as parsing correctly.  However, when I manually run the job itself, I get the following:
    Execution of job failed.  See the history log for details.
    I check the history log and it shows:
    [474] Unable to refresh Database Mail profile Database Mail Profile. (reason: ) (Not a typo, the history log shows no reason)
    [260] Unable to start mail session.
    [396] An idle CPU condition has not been defined - OnIdle job schedules will have no effect
    The command text on the failing job step is as follows:
    DECLARE @date [varchar](10)
    SET @date = CAST(GETDATE() AS [varchar](10))
    EXEC [dbo].[GetExceptions]
    @company = 'MyCompany',
    @checkDate = @date
    With regard to the date value being passed as varchar: This stored procedure is used to check for exceptions against multiple databases on this server (hence the company parameter) via dynamic SQL.  I'd much prefer to use proper data typing but this
    is the only way I could get it to work.
    Does anyone have any suggestions on anything else I could check, or insights into why this is failing?  Any help is greatly appreciated!
    Best Regards
    Brad

    I am not sure if this really helps but I would do follow the below steps:
    1. make sure sql server agent has database mail enabled(rigt click on server agent--properties--alert system--enable database mail and choose right profile.) and RESTART THE SQL SERVER AGENT.(i know you said it i working, but sometimes,  restart the
    sql server agent might fix)
    2. check agent error log and check if any error messages.
    3. run the command text you mentioned in sql server and see if it is working.(i know you said it is working but just to make sure).
    4. make sure sql server agent service user has permissions to run database mail in msdb. check this https://msdn.microsoft.com/en-us/library/ms186358.aspx
    5. Check the output from select * from msdb.dbo.sysmail_log and if it says anything
    6.it does not look like the job log is getting truncated but to make sure, get the job step output to a text file.to do this, edit the job step and on the job step properties click on advanced,  enter path to the output file. this will give the complete
    output for the step.
    Hope it Helps!!

Maybe you are looking for

  • Data Mining overflow error while loading the mining viewer

    I developed a time series model that processes succesfully. The problem I have is that when I try to view the mining model viewer that displays the times series on a chart, I get the error below: An error occurred while a prediction query was being e

  • Creating a duplicated database from active database

    I'm having problem trying to duplicate a database from a target database (PROD) to the auxiliary one (AUX). This is what I've configured: listener.ora SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (GLOBAL_DBNAME = PROD)       (ORACLE_HOME =

  • Issue in Price record determination

    Hello All, Scenario: The sales order has to determine 2 types of tax ( service , VAT)in the pricing procedure, so the customer classification has respective  parameters and the price conidtions are maintained for both the condition types the problem

  • Dynamic date in Archiver query

    Hello, I'm trying to set up a scheduled job in Archiver to remove old revisions higher than 20 and older than 2 months. I can get the results I need if I hard-code the date, but I'm looking for a way to put (current date - 2 months) into the Archiver

  • Decrypt the response SOAP message

    Hi Everybody !!! Another doubt concerning SOAP Security. I have configured SOAP Receiver adapter and Receiver Agreement for encrypting the (request) message that is sent to a Web Service. What about the response message? There's no place in the Recei