Does SQL Server agent/IIS plugin support User-Defined metrics?

Hi,
Does anyone know if there is a way to add a user-defined metric that connects to a SQL Server database?
Thanks

Recently, I released a full MySQL plug-in, for example - http://www.pythian.com/blogs/mysql-plug-in-for-oracle-grid-control
For me it's not very difficult but it takes some time to get used to.
I did presentations on creating Management plug-ins and couple articles in IOUG SELECT Magazine. The latest presentation and whitepaper is here - http://www.pythian.com/blogs/466/ioug-collaborate-07-oracle-10g-grid-control
Official extensibility guide has much more details and is priceless reference but, still, not everything is documented there.

Similar Messages

  • Unable to view SQL Server Agent while logged in as user

    Hello Everyone,
    I have granted SQLAgentUserRole permission to one of the user and using enterprise edition of SSMS. still user is not able to view SQL Server Agent. Any help will be greatly appriciated.

    There is no Enterprise Edition of SSMS. There is SSMS Basic and SSMS Complete. Prior to 2012 sp1, only SSMS Basic were available with Express Edition - but as of 2012 sp1 Expredd also offers SSMS Complete. SSMS Complete is selected bu default when you install
    SSMS (unless you are prior to 2012 sp1 and are using Express, of course).
    However, even SSMS Basic *should* show Agent assuming you have permissions for that. This is hearsay, but from trusted sources. Here is what to do:
    Check what is installed for the machine from where you are running SSMS. You can do that using SQL Server Installation Center - see this blog post: http://sqlblog.com/blogs/tibor_karaszi/archive/2011/02/10/what-does-this-express-edition-look-like-anyhow.aspx
     (towards the end).
    On that machine try both this problematic account as well as an account which is sysadmin. Does the sysadmin account see Agent? If so, you know permissions aren't granted properly. If not, then you know the tool is the problme.
    Also try the problematic account from a machine where you know you see Agent normally. Again, this will help you assess whether the problem is the tool (SSMS) or permissions for the account.
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • Error trying to run SSIS Package via SQL Server Agent: DTExec: Could not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object

    Situation:
    SSIS Package designed in SQL Server 2012 - SQL Server Data Tools
    Windows 7 - 64 bit.
    The package (32 bit) extracts data from a SQL Server db to an Excel Output file, via an OLE DB connection.
    It uses 3 package variables:
    *) SQLCommand (String) to specify the SQL Statement to be executed by the package
    Property path: \Package.Variables[User::ExcelOutputFile].Properties[Value]
    Value: f:\Output Data.xls
    *) EXCELOutputFIle (String) to specify path and filename of the Excel output file
    Property path: \Package.Variables[User::SQLCommand].Properties[Value]
    Value: select * from CartOrder
    *) VarObjectDataSet (Object) to hold the data returned by SQL Server)
    Property path: \Package.Variables[User::VarObjectDataSet].Properties[Value]
    Value: System.Object
    It consists out of 2 components:
    *) Execute SQL Task: executes the SQL Statement passed on via a package variable. The resultng rows are stored in the package variable VarObjectDataSet
    *) Script Task: creates the physical output file and iterates VarObjectDataSet to populate the Excel file.
    Outcome and issue:The package runs perfectly fine both in SQL Server Data Tools itself and in DTEXECUI.
    However, whenever I run it via SQL Server Agent (with 32 bit runtime option set), it returns the errror message below.
    This package contains 3 package variables but the error stating that a package variable can not be set, pops up for the VarObjectDataSet only.  This makes me wonder if it is uberhaupt possible to set the value of a package variable
    of type Object.
    Can anybody help me on this please ?
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:40:20 PM  DTExec: Could
    not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object.  Started:  6:40:20 PM  Finished: 6:40:21 PM  Elapsed:  0.281 seconds.  The package execution failed.  The step failed.
    Thank you very much in advance
    Jurgen

    Hi Visakh,
    thank you for your reply.
    So, judging by your reply, not all package variables used inside a package need to be set a value for when run in DTEXEC ?
    I already tried that but my package ended up in error (something to do with "... invocation ...." and that error is anything but clearly documented. Judging by the error message itself, it looks like it could be just about anything. that is why I asked my
    first question about the object type package variable.
    Now, I will remove it from the 'set values' list and try another go cracking the unclear error-message " ... invocation ...". Does an error message about " ... invocation ..." ring any bells, now that we are talking about it here ?
    Thx in advance
    Jurgen
    Yes exactly
    You need to set values only forthem which needs to be controlled from outside the package
    Any variable which gets its value through expression set inside package or through a query inside execute sql task/script task can be ignored from DTExec
    Ok I've seen the invocation error mostly inside script task. This may be because some error inside script written in script task. If it appeared after you removed the variable then it may because some reference of variable existing within script task.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SQL server agent job running as Agent Service Account whose service account does not have r/w access but is still able to write?

    Hi. I am newer to SQL server security and am reviewing some of our SQL server's configuration to make sure the services are running under accounts with least privilege.  I have a SQL server 2012 instance whose Agent service is configured to run
    under an AD user account named 'SQLServices'.  The jobs on this server are configured to run as 'SQL server agent service account', which means they should execute as user 'SQLServices'.  The jobs are set up to execute SSIS packages which read and
    write to a database on the same server where the agent job is scheduled and SSIS package installed (all on same server).  The jobs are currently executing without error and are reading writing data correctly.  Upon close examination, it turns out the
    SQLServices account is not assigned to the 'sysadmin' role and had no users mapped to any databases on this server.  How are these jobs working?  I verified in profiler that the login name indeed is 'SqlServices'.  I also verified
    that SQLServices login has no database access by remote-ing onto the server and trying to log into the DB, and access was denied as expected.  According to the literature, the Agent service needs to be a member of 'sysadmin role' but I am reading
    some cases where that is not necessarily the case.  So this is not so concerning.  What is concerning is that the login 'SQLServices' had no access to the databases on that server yet it is reading and writing to the databases as if it does. 
    The only thing I can think of is maybe jobs run as 'SQL server agent service account' on the same server as the databases it r/w to somehow has some kind of default access.  What am I missing here?  Any input would be helpful.

    After 2 days on this forum I found the answer to my own question.  In retrospect, I should have posted this under 'SQL Server Security', but I didn't know it existed.
    The 2 threads below explain that Sql agent actually runs using SID (service) NT SERVICE\SQLSERVERAGENT if you chose that when you installed.  This will automatically create an associated login NT SERVICE\SQLSERVERAGENT in SQL server with sqladmin
    role.  This is the login that Agent uses to connect to the local instance of SQL server.  If you changed to domain account to run the service during install or after using config manager, basically NT SERVICE\SQLSERVERAGENT is still
    used to connect to your local instance behind the scenes (even though you will still see your domain user as account), and the domain account is used to reach outside the server. 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9e6bb2de-8fd0-45de-ab02-d59bbe05f72e/servicedatabase-accounts-nt-servicemssqlserver-nt-servicesqlserveragent-what-are-they-for
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/b83a52fd-fe11-4c28-a27b-88be8ae79f2a/how-do-i-change-sql-server-agent-service-account-to-nt-servicesqlserveragent?forum=sqlsecurity

  • SQL Server Agent job between 2 instances fails with Error 18456 - Login Failed for user

    Hi,
    SQL Server version: 2012 EE
    OS: Windows 2008 R2 Enterprise
    In my server, i have 2 instances, and I am trying to configure a SQL Server Agent job to query one table in Instance A, and insert some modified data in Instance B, both in the same server.
    When i execute the job in instance A, i get the following error:
    Executed as user: NT SERVICE\SQLSERVERAGENT. Login Failed for user "NT SERVICE\SQLSERVERAGENT". [SQLSTATE 28000] (Error 18456). The step failed.
    I have already configure instance A as Master and disabled encryption, by changing the parameter MsxEncryptChannelOptions to 0 in regedit. I've also made my target instance (instance B) as a Target.
    What am i missing?
    Thanks for your attention and pacience

    Hello,
    The NT SERVICE\SQLSERVERAGENT (virtual) account is not available on the other as you just mentioned. That is the reason for the login
    failed error. Try using a Windows login as the
    SQL Server Agent service account in both servers, the same Windows login (not a virtual account), and run jobs as the “sa” account.
    http://msdn.microsoft.com/en-us/library/ms345578.aspx
    You can also try a proxy account.
    http://technet.microsoft.com/en-US/library/ms190698(v=SQL.105).aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • I want to give a user to read only rights on sql server agent 2008

    I want to give a user to read only rights on sql server agent 2008.When I giving SQLAgentuser Role then user is only able to view SQL Server agent as Green but no job visible in job activity monitor.Currently he has db_reader rights on one user database.
    What rights should I give?
    Thanks

    There are 3 SQL server Agent fixed database roles in sql server.
    1.SQL AgentUSerRole:- To create and manage jobs
    2.SQLAgentReaderRole: To grant read acces.
    3.SQLAgentOperatorRole : to run and delete jobs.
    For you question you can create a user and grant him SQLAgentReaderRole.
    Example:
    Create LOGIN test with Password='abc'
    Use msdb;
    GO
    Create User test for login test
    use msdb;
    EXECUTE sp_addrolemember @rolename='SQLAgentReaderRole',@membername='test'
    Hope this solves your problem!!!

  • Replication stopp after change changing SQL Server Agent User

    Hi,
    I tryed to change the user for SQL Server Agent on my Distributor. We use pushed transaction replications. But after i changed the user, all replications stopped:
    ERROR: (from SQL Monitor)
    The job failed.  The Job was invoked by Start Sequence 0.  The last step to run was step 3 (Detect nonlogged agent shutdown.).
    The new user is a domainusert too, and had administrative rights on the server. I changed the user to start SQL Server Agent on other servers without error.
    Can anybody tell me, how to change the user on a distributor, without stopping all replications?
    Thanks
    Kind regards,
    Andreas

    Hi Andreas,
    You are likely running into a permissions issue.
    Verify the Log Reader Agent process account is db_owner in the distribution database and that the account used to connect to the Publisher is db_owner in the publication database.
    Verify the Distribution Agent process account is db_owner in the distribution and subscription databases, is a member of the PAL, and has read permissions on the snapshot share.
    This is covered in
    Replication Agent Security Model.
    Brandon Williams (blog |
    linkedin)

  • SSIS Package Fails when Scheduled as a SQL Server Agent Job

    I have an SSIS package that runs without any problems when executed through BIDS.
    However, when I schedule the SSIS as an Agent job, it fails completely or part way through. When it partially runs, the part that it is failing on is a Script Task that moves the source data file to an archive folder (on the same server).
    I have tried using my domain account as the owner of the job, then the job fails straight off and I get an error:
    Unable to determine if the owner (Domain\MyID) of job JobName has server access (reason: Could not obtain information about Windows NT group/user 'Domain\MyID'
    If I change the owner to the 'sa' account , then the job partially runs, but then fails because 'sa' is a SQL account and does not have access to the filesystem.
    I have managed to get it to work by using the SQL2008_Local account and granting modify permissions to the affected folders.
    My question is - what is the advised way of doing this?
    Thanks
    Gary

    Hi Garyv.King,
    When you see a SSIS package fails running in a SQL Agent job, you need to first consider the following conditions:
    1. The user account that is used to run the package under SQL Server Agent differs from the original package author.
    2. The user account does not have the required permissions to make connections or to access resources outside the SSIS package.
    For more detailed information about the issue, please following this KB article:
    An SSIS package does not run when you call the SSIS package from a SQL Server Agent job step
    http://support.microsoft.com/kb/918760 
    You can check SQL Server Agent’s activity logs, Windows Event logs and SSIS logs to get more clues. Also the tool Process Monitor is helpful to track the cause of registry or file access related issues.
    The following 4 issues are common encountered in the SSIS forum.
    1. The package's Protection Level is set to EncryptSensitiveWithUserKey but your SQL Server Agent service account is different from the SSIS package creator.
    2. Data source connection issue.
    3. File or registry access permission issue.
    4. No 64-bit driver issue.
    For more information about it, please see:
    How do I troubleshoot SSIS packages failed execution in a SQL Agent job:
    http://social.technet.microsoft.com/Forums/en-US/sqlintegrationservices/thread/e13c137c-1535-4475-8c2f-c7e6e7d125fc 
    Thanks,
    Eileen

  • Getting an error running an SSIS package from SQL server agent

    This is the first time I'm running an SSIS package in SQL server agent.
    I'm running a SQL server agent job and getting this error message:
    Am I using the correct options? (options list below)
    Message
    Executed as user: SITEX\stxdatasqlexec. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 32-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  1:42:00 PM  Error: 2014-04-17
    13:42:01.01     Code: 0xC0011007     Source: {B72BF421-785A-44EC-9570-D2A40B046CA7}      Description: Unable to load the package as XML because of package does not have a valid XML format. A
    specific XML parser error will be posted.  End Error  Error: 2014-04-17 13:42:01.02     Code: 0xC0011002     Source: {B72BF421-785A-44EC-9570-D2A40B046CA7}      Description: Failed
    to open package file "C:\Users\halexandrovich\Documents\Nbr_Rolls_base.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened or loaded correctly
    into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.  End Error  Could not load package "C:\Users\halexandrovich\Documents\Nbr_Rolls_base.dtsx"
    because of error 0xC0011002.  Description: Failed to open package file "C:\Users\halexandrovich\Documents\Nbr_Rolls_base.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a
    package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.  Source:
    {B72BF421-785A-44EC-9570-D2A40B046CA7}  Started:  1:42:00 PM  Finished: 1:42:01 PM  Elapsed:  0.047 seconds.  The package could not be found.  The step failed.
    Here are the options I'm using:
    package source - file system
    data source  destination = my SQL server db
    execution option - use 32 bit runtime
    command line entry:
    - /FILE "C:\Users\halexandrovich\Documents\Nbr_Rolls_base.dtsx"  /CONNECTION DestinationConnectionOLEDB;"\"Data Source=esxdspr-sql01.sitex.com;Initial Catalog=SuesTbls;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=false;\""
    /CONNECTION SourceConnectionFlatFile;"\\sitex.com\dfs\Production\SFTPData\LPSEFTProcess\FromAADFS\Rpt_Nbr_Rollsperbatch_20140331_20_0.txt"
    /X86  /CHECKPOINTING OFF /REPORTING E
    I checked the filename so it must be the XML format it's complaining about.

    Thank you, pituach.
    I tried running the package using just my c drive without partition, C:\Nbr_Rolls.dtsx, but still getting the same
    error. I do not see any option on this site to post my package. I know it's not the path that's the issue. Our support desk already fixed that because I was getting a different message before.
    Message
    Executed as user: SITEX\stxdatasqlexec. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 32-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  11:23:00 AM  Error: 2014-04-18
    11:23:00.44     Code: 0xC0011007     Source: {2BEE62EB-DD08-4867-9F5C-660167964650}      Description: Unable to load the package as XML because of package does not have a valid XML format. A
    specific XML parser error will be posted.  End Error  Error: 2014-04-18 11:23:00.45     Code: 0xC0011002     Source: {2BEE62EB-DD08-4867-9F5C-660167964650}      Description: Failed
    to open package file "C:\Nbr_Rolls.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of
    either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.  End Error  Could not load package "C:\Nbr_Rolls.dtsx" because of error 0xC0011002.  Description: Failed
    to open package file "C:\Nbr_Rolls.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of
    either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.  Source: {2BEE62EB-DD08-4867-9F5C-660167964650}  Started:  11:23:00 AM  Finished: 11:23:00 AM 
    Elapsed:  0.125 seconds.  The package could not be found.  The step failed.

  • [Forum FAQ] How do I disable all subscriptions without disabling Reporting Services and SQL Server Agent?

    Introduction
    There is the scenario that users configured hundreds of subscriptions for reports. Now they want to disable all the subscriptions, but Reporting Services and SQL Server Agent service should be enable, so the subscriptions will not delivery reports to users
    and users could run the reports and create jobs on the server.
    Solution
    To achieve this requirement, we need to list all subscriptions and their schedules by running query, then use loop statement to disable all the subscription schedules by Job name.
    On the Start menu, point to All Programs, point to Microsoft SQL Server instance, and then click SQL Server Management Studio.
    Type Server name and select Authentication, click Connect.
    Click New Query in menu to open a new Query Editor window.
    List all subscriptions and their schedules by running the following query:
    Use ReportServer
    go
    SELECT   c.[Name] ReportName,           
    s.ScheduleID JobName,           
    ss.[Description] SubscriptionDescription,           
    ss.DeliveryExtension SubscriptionType,           
    c.[Path] ReportFolderPath,           
    row_number() over(order by s.ScheduleID) as rn             
    into
    #Temp  
    FROM     
    ReportSchedule rs           
    INNER JOIN Schedule s ON rs.ScheduleID = s.ScheduleID           
    INNER JOIN Subscriptions ss ON rs.SubscriptionID = ss.SubscriptionID           
    INNER JOIN [Catalog] c ON rs.ReportID = c.ItemID AND ss.Report_OID = c.ItemID   
    select * from #temp
    Use the loop statement to disable all the subscription schedules by Job name:
    DECLARE
    @count INT,
    @maxCount INT  
    SET @COUNT=1  
    SELECT @maxCount=MAX(RN)
    FROM
    #temp         
    DECLARE
    @job_name VARCHAR(MAX)                  
    WHILE @COUNT <=@maxCount        
    BEGIN      
    SELECT @job_name=jobname FROM #temp WHERE RN=@COUNT  
    exec msdb..sp_update_job @job_name = @job_name,@enabled = 0     
    SET @COUNT=@COUNT+1   P
    RINT @job_name   
    END   
    PRINT @COUNT 
    Reference
    SQL Agent – Disable All Jobs
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • Execution of a batch file within SSIS fails in Sql Server Agent Job

    Hi All,
    I have an SSIS Package, which simply runs a batch file , the code for the batch file is
    MOVE \\cambosnapp01\Claims\Analytics\NICB\CurrentAlerts\* \\cambosnapp01\Claims\Analytics\NICB\AlertsArchive
    If i run the SSIS package manually it runs fine and moves all the files, however if i run the package through a Sql Agent Job it fails with the following error
    The directory "\\Cambosnapp01\Claims\Analytics\NICB" does not exist
    This is where the batch file is located, i am not able to understand if the SSIS package is running fine then why not the sql agent job?
    I also tried to create a sql agent job using Operating System(CmdExec) and i copied my batch file code in the command i am running it as SQL Server Agent Service Account , and here it fails as
    Executed as user: CAMELOT\svcDW. Access is denied.  Process Exit Code 1.  The step failed
    Does this mean this user doesnt have the rights to excute a batch file? how did this user even come up i am not running it from this user i am running it from SQL Server Agent Service Account . I dont know who is that user and if he even has the rights to
    execute a batch file.
    Can someone please help me with any solution for this? either first way or second way anything works fine for me.
    Thanks

    Hi SQLDEV,
    According to your description, you are experiencing the issue "The directory "\\Cambosnapp01\Claims\Analytics\NICB" does not exist" when run the SSIS package
    in SSMS by using SQL Server Agent, right?
    In your scenario, since you can run the package in SSDT manually. So as per my understanding, the issue can be caused by that the Services Account of your SQL Server Agent do not have the permission on that folder. To avoid this issue, you can set the folder
    permission for your SQL Server Agent account or change the services account to an account who have the corresponding permission. Please refer to the link below to see the details.
    https://msdn.microsoft.com/en-us/library/bb727008.aspx
    https://msdn.microsoft.com/en-us/library/ms345578.aspx
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • VBScript Runs Correctly From Command Prompt, But Not From SQL Server Agent Job

    I'm trying to run this script on my local machine to do some post-batch cleanup and it doesn't run correctly from the scheduled job (or when I invoke the job).
    Here's the script in question:
    Option Explicit
    Const filePath = "C:\Documents and Settings\jmunn\My Documents\Visual Studio 2008\Logs\"
    Const holdDays = 6
    main
    Sub Main()
    ClearArchive
    End Sub
    Sub ClearArchive()
    Dim fso 'As Scripting.FileSystemObject
    Dim fld 'As Scripting.Folder
    Dim f 'As Scripting.File
    Dim delLogName, delLogOut, delCtr
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fld = fso.GetFolder(filePath)
    delLogName = filePath & "Nightly Backup - Backup Logs Deleted" & ".txt"
    Set delLogOut = fso.CreateTextFile(delLogName, True)
    delLogOut.WriteLine(delLogName)
    delLogOut.WriteLine("")
    delLogOut.WriteLine("-- The following log files were deleted on " & DateValue(Now()) & " at " & TimeValue(Now()))
    delLogOut.WriteLine("")
    delCtr = 0
    For Each f In fld.Files
    If Left(f.Name, 48) = "Nightly Backup - SQL Server Databases_Subplan_1_" And Right(LCase(f.Name), 4) = ".txt" Then
    If DateDiff("d", f.DateCreated, Date()) > holdDays Then
    delLogOut.WriteLine(f.Name)
    fso.DeleteFile f, True
    delCtr = delCtr + 1
    End If
    End If
    Next
    If delCtr = 0 Then
    delLogOut.WriteLine("No log files were deleted this run...")
    End If
    Set fld = Nothing
    Set fso = Nothing
    delLogOut.Close
    End Sub
    If I put the script in its own file and run it from the command prompt, it runs just fine. If the script runs from the SQL Server Agent job, the for-loop will delete the files correctly, but the filenames
    do not get written to the deletion log file and the counter does not get incremented, so according to the job log, nothing was deleted. Why does the script run differently from each invocation? It can't be a permission thing, the service that logs in has full
    access to the directory and the files do get deleted. Any ideas out there?
    Between this and other outstanding issues, I'm quickly losing faith in SQL Server.  >=o(
    Thanks in advance for your thoughts!
    John
    Version Info:
    Microsoft SQL Server Management Studio      10.0.2531.0
    Microsoft Analysis Services Client Tools      10.0.1600.22
    Microsoft Data Access Components (MDAC)      3.85.1132
    Microsoft MSXML      2.6 3.0 4.0 5.0 6.0
    Microsoft Internet Explorer      8.0.6001.18702
    Microsoft .NET Framework      2.0.50727.3603
    Operating System      5.1.2600
    "A bus station is where a bus stops. A train station is where a train stops. On my desk I have a workstation..."

    Hi
    jrmunn
    i am trying to execute VB script to refresh my excel files.. using Vbscript file through SQL Agent job step.
    i have copied VBscript in a file with the extension RefreshExcel.vbs kept in C:\RefreshExcel.vbs
    Below is the script used inside the file (RefreshExcel.vbs)
    //---Script code-----------------------------------------------------------------
    Dim objXL, objWB
    Dim FileLocation, FileName
    On Error Resume Next
    'lgnConn = 1
    FileLocation = "F:\Reports\Reports"
    Set objXL = CreateObject("Excel.Application")
    objXL.DisplayAlerts = False
    FileName = "ReportFile1.xlsx"
    'MsgBox (FileLocation & "/" & FileName)
    Set objWB = objXL.Workbooks.Open(FileLocation & "/" & FileName)
    objWB.EnableConnections
    objXL.CalculateUntilAsyncQueriesDone
    objWB.RefreshAll
    objXL.CalculateUntilAsyncQueriesDone
    objWB.RefreshAll
    objXL.CalculateUntilAsyncQueriesDone
    objWB.Save
    objWB.Close
    Set objWS = Nothing
    Set objWB = Nothing
    objXL.Quit
    Set objXL = Nothing
    'MsgBox ("Refresh Completed")
    ---------------------------------------------------------------------------------------------------//Script complete
    Now when i am trying to call this script file in SQL agent job step (as you mentioned )
    as Type -cmdExec(OperatingSystem)
    cscript "C:\RefreshExcel.vbs"
    Issue: job step executed succesfully ,,but without performing any refresh on the excel. So i am not understandig what is going wrong. the same script file work when i am calling it through a batch file (window scheuler task). But it doesnt support
    to run the file "when user is not logged in"
    that is why  i want to refresh my excel file through sql agent ,which can be scheduled to any time and cab be run as SQL agent credentials.
    Can you please help me on this ...i have tried all the option but nothing working .. found hope by seeing your solution.
    Thanks in advance.
    Please help me. :-(

  • Reporting Services 2012 for SharePoint and SQL Server Agent "Subscriptions and Alerts"

    After installing Reporting Services for SharePoint (Denali) in my test farm, I'm trying to configure the "SQL Server Agent" access for Reporting Services.  From Central Admin I'm going to the Reporting Service applicaiton configuration screen and selecting
    "Provision Subscriptions and Alerts".  I've tried both options on this screen.  I've manually executed the "download sql script" in SQL Server, as well as entering a user with SQL sys admin rights on the SQL server into the login fields on the screen. 
    The role and permissions have been created for the application pool service account, but Reporting Services is still trying to connect with the annonymous login because I'm getting the following alert each time I open the "Provision Subscriptions and Alerts"
    screen:
    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    The "status" on the screen still shows "SQL Server Agent State cannot be determined".  Has anyone else seen this? 
    Thanks!!

    Thanks for your reply!
    1) Looks like the new Reporting Services does not run as a Windows Service so it's not listed in the "Configure Service Accounts" pulldown.  As a result, I don't see how to set the service account.  It's only assigned to an application pool. 
    I installed it into an existing application pool and that application pool "is" in the list and has a domain service account already assigned.
    2) Which users need to be in here in order to configure the "Provision Subscriptions and Alerts" screen?  I already have the farm admin account which is the account I use when running Central Admin.
    3) As mentioned in #1, I've installed Reporting Services into an existing application pool with other service apps.
    4) This link is for Reporting Services 2008 R2 which is very different install process.  But I did follow the SQL Server Reporting Services 2012 RC0 installation instructions and the Reporting Services is functioning correctly with no errors. 
    I'm just not able to configure the sceduling the alerting with interfaces with the SQL Server Agent.
    Thanks!

  • Unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1

    I am unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1. Log message is as follows:
    Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
    Failed to verify Authenticode signature on DLL 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\xplog70.dll'.
    Error: 17750, Severity: 16, State: 0.
    Could not load the DLL xplog70.dll, or one of the DLLs it references. Reason: (null).

    Hi JFriedley,
    According to your error message, there might three reasons for this issue.
    xplog70.dll is corrupt, you need to check if you have any SQL Server running on same file version and same production
     edition. If xplog70.dll is corrupt, you can copy it from the new server where agent is running fine to your problematic server.
    Native client not installed properly. If you try applying any latest Service Pack or Cumulative Update then check if the SQL Server Agent can start, if that also doesn’t solve issue then try to reinstalling SQL Server Native client from SQL Server setup
    files.
    There is a similar issue about error 17750, you can review the following article.
    http://blogs.lostincreativity.com/sqldba/sqlserver-error-17750-could-not-load-the-dll-xpstar90-dll/
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Sql Server 2012 Login Failed for user "NT Authority\System"

    I have installed SQL Server on a new server. I have been getting the following error on each of the database in it.
    Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'ABC'. [CLIENT: xxx.xxx.xxx.xxx]
    Here is some information on the instance:
    1) Default instance
    2) SQL Server, Sql Server Agent, Sql Server Reporting services are running / log on using a domain service account.
    3) Sql Server Browser is disabled.
    4) SQL Server VSS Writer is running / log on as Local Service.
    5) NT AUTHORITY\SYSTEM does exists in Login with just public server roles.
    I ran a trace on login failed and I get:
    ApplicationName: Microsoft Windows Script Host
    and it runs every 15 minutes.
    Help please?

    Hi,
    The error was thrown when the SCOM components connected to the backend SCOM databases.
     You can specify a domain account, grant it the sysadmin role and the error should be gone.
    Also, see the replies in your previous thread:
    http://social.technet.microsoft.com/Forums/en-US/23f6b6cb-ec41-4117-8613-26d24c948827/login-failed-for-user-username-reason-failed-to-open-the-explicitly-specified-database
    Thanks.
    Tracy Cai
    TechNet Community Support

Maybe you are looking for

  • IPhone 4 Car Connection (USA Spec Intergration) And Docking

    Hi, I'm likely going to be getting the new iPhone 4 when it rolls out on Verizon. First off, please don't tell me how big of a mistake I'm making and alike. AT&T is terrible in my area, and most of the people I talk to (work or friends) have Verizon.

  • CQ page is not rendering properly. It is not rendering HTML. It is showing HTML source code as is.

    On some of the pages, I am getting this weird behavior wherein page is not rendering properly. It is showing HTML source code as is. Could you please help me out? What could be the issue? And how can we get rid of the same?

  • Create a dynamic tool tip

    Hi All, I am working in an application where I am using the treeview widget. My requirement is to add a dynamic tool tip to the tree nodes. I read in a forum that I have to look into IID_ITIP. But I am still not clear as to how will I create a tool t

  • IMovie image quality

    Hi, at http://www.prgomet.net/iMoveIQ.png you can see what I talk about. I shoot using Canon 5D Mk2, those are h264 40mbit mov files. When I import them iMovie makes great looking AIC encoded mov files and puts them in events. That AIC made by iMovie

  • FCP Serial problem

    Hey, I recieved my FCP STUDIO 2 in the mail today; I am upgradeing from Production Suite ( FCP 4.5, DVD Studio Pro 3, etc... ) I go to install and I enter the first serial key ( the one from FCP S2 ) and then it asks for my old number. I assumed it w