DBACOCKPIT uses MS SQL Server Agent service?

Hello
I am trying to make backup from DBACOCKPIT to a netowrk location.
If i go to MS SQL SERVER AGENT and define log on by a domain user i get the error
"Executed as user: GOLDENFOODS\kkoulis. Must declare the scalar variable "@location1". [SQLSTATE 42000] (Error 137) "
anybody can help with the solution?
thx

Hello
Yes i have created it to the location which you mention and it works fine.
After if i go to SAP at the transaction DBACOCKPIT and try to run a FULL or LOG backup there, i have the following error:
SQL Job information   ******************************
Jobname:    SAP CCMS Log Backup of GDW [20110802094537-2-094537]
Type:       TSQL
DB-Name:    GDW
For Run:    20110802  09:45:37
Job history information  *****************************
Stepname:   CCMS-step 1
Command:    declare @exeStmt nvarchar(2000) exec gdw.sap_backup_databases @dbList=
            "GDW",@r3Db="GDW",@bDev="@FisticLOG2",@expDays= 27,@jobName= "SAP CCMS
             Log Backup of GDW [20110802094537-2-094537]",@bkupChecksum="N",@bkupC
            ompress="N",@bkupType="L",@nativeBkup="N",@exeDate = "20110802094537",
            @bkupSim = "N",@format = 0,@init = 0,@bkupDb = "GDW",@unload = 0,@exeS
            tmt = @exeStmt OUTPUT
Status:     (failure)
Message:    2528
Severity:                                                                                15
Duration:   0  hours(s)  0  min(s) 0  sec(s)
Last msg:   Executed as user: GOLDENFOODS\kkoulis. Must declare the scalar variabl
            e "@FisticLOG2". [SQLSTATE 42000] (Error 137)  Incorrect syntax near t
            he keyword 'with'. If this statement is a common table expression, an
            xmlnamespaces clause or a change tracking context clause, the previous
             statement must be terminated with a semicolon. [SQLSTATE 42000] (Erro
            r 319)  DBCC execution completed. If DBCC printed error messages, cont
            act your system administrator. [SQLSTATE 01000] (Error 2528).  The ste
            p failed.
                    <----
End of Job Step History -
>
thx in advance

Similar Messages

  • Unable to start SQL server agent service

    hi,
    We have 2 Node SQL Cluster that was working fine. Then We migrated the Linux DNS to Windows DNS successfully.Now restarted the SQL Server after it when we try to start the SQL Server Agent service its says the below msg while machine name and cluster
    entries are in windows dns and resolving the IP to name and name to IP
    Error msg: The MSSQLSERVER service on Local Computer started and then stopped.  Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service." error message.
    But whenever we set the Linux DNS Server ip in SQL Servers then it successfully starts the service. Now i want to know why its happening and what are the requirements or DNS entries/SPN which we missing when we migrated the linux DNS to windows
    dns
    Sagar

    I was experiencing this issue or one just like it on one of our SQL clusters (SQL Server 2008 R2, two node).
    The fix for us was the database Security Login for: NT SERVICE\SQLAgent$<instancename>  was missing.  The actual service account assigned to the SQL Agent service was a valid domain account and we had the credentials correct in the service
    configuration, so no changes were needed there.
    Using SQL Server Management Studio we manually added this BUILT IN account ( NT SERVICE\SQLAgent$<instancename> ) to the instance, and then assigned it user role = sysadmin (to go along with the default role = public).
    Once this was done, we tried to restart the clustered SQL Agent service and it started and remained started.
    Hope this helps someone, we spent over a day pouring over the installation trying to find the cause.
    This worked for me, thanks:-)

  • Starting SQL Server Agent service

    I have a brand new 64-bit laptop and have installed both SQL Server 2014 and SQL Server 2012sp1, but neither instance is able to start its SQL Sever Agent Service.  The error is 1053:  'The service did not respond to the start or control request
    in a timely fashion'. Googling that message does not seem to give helpful step by step solutions. Please help.
    Dave Juergens
    [email protected]
    Dave Juergens

    could you tell us your sql server edition - if it is EXPRESS edition - it does not comes with SQL Server agent. you will sql server agent service in configuration manager but it does not start because the feature is not available.
    you can find the sql edition using. select @@version
    and post the output here
    if it is not Express edition, could you please check the error log or event viewer and if there is more detailed information on the error.
    Hope it Helps!!

  • Using the SQL Server Agent for the first time

    I have set up several jobs to run automatically throughout the day. Each job just does one thing: executes an SSIS package.
    The packages themselves run perfect when I test them in Visual Studio 2005, but when the SQL Server Agent tries to run the job I am getting failed jobs.
    Is there any tutorials or walkthroughs that can teach my about using the SQL Server Agent? If I wanted extensive help troubleshooting my SQL Server Agent problems which part of the message boards would I post that too?
    Thanks for the info!

    Anyone?
    I really need some resources for SQL Server Agent 2005.
    Refer these links,
    http://technet.microsoft.com/en-us/library/ms141701(v=sql.90).aspx
    http://stackoverflow.com/questions/10489392/permissions-issue-running-ssis-package-from-sql-job
    Regards, RSingh

  • Change SQL Server Agent service account

    How can I change the SQL Server Agent service account from NT SERVICE\SQLSERVERAGENT to a domain user? and most importantly is what permissions I have to give that domain user?
    I know that when SQL Server setup, the installer gives the domain user (that we choose to run a SQL Server service) the least privileges required, but my case is that I chose NT SERVICE\SQLSERVERAGENT and
    now I want to change it to domain user so I can run successfully jobs that execute something on another SQL Servers.
    If I JUST change the service account in the SQL Server Agent Properties window to a normal domain user, this is not enough and non of the jobs (even that execute local jobs) will work ... 
    So what privileges I should give that domain user to be able to run ALL jobs successfully?

    Thanks Andreas ... yes it seems that my problem is not what I was thinking.
    Stan210, thank you also :) .... my connection is trusted and the following is the error I'm getting:
    The job failed.  Unable to determine if the owner (MYDOMAIN\JobOwnerUser) of job
    MyJOB has server access (reason: Could not obtain information about Windows NT group/user 'MYDOMAIN\JobOwnerUser', error code 0x6e. [SQLSTATE 42000] (Error
    15404)).
    if I change the owner of the job to sa I get the follwoing error:
    Executed as user: CCCAE\RASO_SSAgent. Login failed for user 'MYDOMAIN\AgentDomainUser'. [SQLSTATE 28000] (Error 18456)  Cannot open database "DB_on_other_Server" requested by the login. The login
    failed. [SQLSTATE 42000] (Error 4060).  The step failed.
    if I keep the owner of the job "sa" and add the 'MYDOMAIN\JobOwnerUser'
    in 'Run as user' of the step, I get the following error:
    'EXECUTE AS USER' failed for the requested user
    'MYDOMAIN\JobOwnerUser' in the database 'master'.  The step failed.
    please note that 'MYDOMAIN\JobOwnerUser'
    is a sysadmin on both SQL Servers 

  • Scheduling SSIS packages to run using SQL Server Agent Service

    The job failed.  The Job was invoked by Schedule 11 (run package).  The last step to run was step 1 (Execute Package)". how do i resolve this?

    Most probable causes: the developer runs the package in BI studio, it works. The job is deployed and runs in a schedule.
    the sql job agent does not have same rights as the developer.
    the test in BI studio was doen in 32-bit mode , the job by default ran in 64-bit mode. some oledb-odbc drivers may not work.
    Jan D'Hondt - SQL server BI development

  • Can't Start the SQL Server & SQL Server Agent Services

    Hello i had to make a copy of my setup for a coworker in a different country to work with i can't make this two services to start. A timed out error shows and  maybe the logs say something but i can't understand it. 
    Help Please. 
    2014-10-31 12:18:55.66 Server Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
    Feb 10 2012 19:39:15
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    2014-10-31 12:18:55.69 Server (c) Microsoft Corporation.
    2014-10-31 12:18:55.69 Server All rights reserved.
    2014-10-31 12:18:55.69 Server Server process ID is 2540.
    2014-10-31 12:18:55.69 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware Virtual Platform'.
    2014-10-31 12:18:55.69 Server Authentication mode is MIXED.
    2014-10-31 12:18:55.69 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
    2014-10-31 12:18:55.69 Server The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.
    2014-10-31 12:18:55.69 Server Registry startup parameters:
    -d C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf
    -e C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG
    -l C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
    2014-10-31 12:18:55.69 Server Command Line Startup Parameters:
    -s "MSSQLSERVER"
    2014-10-31 12:18:56.21 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
    2014-10-31 12:18:56.21 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-10-31 12:18:56.21 Server Detected 3071 MB of RAM. This is an informational message; no user action is required.
    2014-10-31 12:18:56.21 Server Using conventional memory in the memory manager.
    2014-10-31 12:18:58.04 Server This instance of SQL Server last reported using a process ID of 2532 at 31/10/2014 12:18:20 p.m. (local) 31/10/2014 06:18:20 p.m. (UTC). This is an informational message only; no user action is required.
    2014-10-31 12:18:58.05 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
    2014-10-31 12:18:58.07 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
    2014-10-31 12:18:58.08 Server Software Usage Metrics is disabled.
    2014-10-31 12:18:58.15 spid5s Starting up database 'master'.
    2014-10-31 12:18:58.71 Server CLR version v4.0.30319 loaded.
    2014-10-31 12:18:59.22 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
    2014-10-31 12:18:59.24 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
    2014-10-31 12:18:59.81 spid5s SQL Trace ID 1 was started by login "sa".
    2014-10-31 12:18:59.98 spid5s Server name is 'WIN-3FNEFF25D4V'. This is an informational message only. No user action is required.
    2014-10-31 12:19:00.76 spid13s A self-generated certificate was successfully loaded for encryption.
    2014-10-31 12:19:00.80 spid13s Server is listening on [ 'any' <ipv6> 1435].
    2014-10-31 12:19:00.80 spid13s Server is listening on [ 'any' <ipv4> 1435].
    2014-10-31 12:19:00.80 spid13s Server is listening on [ 'any' <ipv6> 1433].
    2014-10-31 12:19:00.80 spid13s Server is listening on [ 'any' <ipv4> 1433].
    2014-10-31 12:19:00.80 spid13s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
    2014-10-31 12:19:00.80 spid13s Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].
    2014-10-31 12:19:00.80 Server Server is listening on [ ::1 <ipv6> 1434].
    2014-10-31 12:19:00.80 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
    2014-10-31 12:19:00.80 Server Dedicated admin connection support was established for listening locally on port 1434.
    2014-10-31 12:19:00.81 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
    2014-10-31 12:19:00.81 spid13s SQL Server is now ready for client connections. This is an informational message; no user action is required.
    2014-10-31 12:19:00.81 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/WIN-3FNEFF25D4V ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
    2014-10-31 12:19:00.81 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/WIN-3FNEFF25D4V:1433 ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
    2014-10-31 12:19:00.86 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
    2014-10-31 12:19:22.49 spid15s A new instance of the full-text filter daemon host process has been successfully started.
    2014-10-31 12:19:22.68 spid17s Starting up database 'msdb'.
    2014-10-31 12:19:22.69 spid9s Starting up database 'mssqlsystemresource'.
    2014-10-31 12:19:22.69 spid18s Starting up database 'CMOVILBD'.
    2014-10-31 12:19:22.69 spid19s Starting up database 'ArgusTec'.
    2014-10-31 12:19:22.71 spid9s The resource database build version is 11.00.2100. This is an informational message only. No user action is required.
    2014-10-31 12:19:22.90 spid9s Starting up database 'model'.
    2014-10-31 12:19:23.36 spid9s Clearing tempdb database.
    2014-10-31 12:19:23.46 spid9s Starting up database 'tempdb'.
    2014-10-31 12:19:23.67 spid20s The Service Broker endpoint is in disabled or stopped state.
    2014-10-31 12:19:23.67 spid20s The Database Mirroring endpoint is in disabled or stopped state.
    2014-10-31 12:19:23.73 spid20s Service Broker manager has started.
    2014-10-31 12:19:24.67 spid5s Recovery is complete. This is an informational message only. No user action is required.
    2014-11-01 00:00:08.70 spid28s This instance of SQL Server has been using a process ID of 2540 since 31/10/2014 12:19:24 p.m. (local) 31/10/2014 06:19:24 p.m. (UTC). This is an informational message only; no user action is required.
    2014-11-02 00:00:23.48 spid29s This instance of SQL Server has been using a process ID of 2540 since 31/10/2014 12:19:24 p.m. (local) 31/10/2014 06:19:24 p.m. (UTC). This is an informational message only; no user action is required.
    2014-11-03 00:00:53.66 spid29s This instance of SQL Server has been using a process ID of 2540 since 31/10/2014 12:19:24 p.m. (local) 31/10/2014 06:19:24 p.m. (UTC). This is an informational message only; no user action is required.
    2014-11-04 00:00:08.08 spid19s This instance of SQL Server has been using a process ID of 2540 since 31/10/2014 12:19:24 p.m. (local) 31/10/2014 06:19:24 p.m. (UTC). This is an informational message only; no user action is required.
    2014-11-04 18:03:23.74 spid53 Attempting to load library 'xpsqlbot.dll' into memory. This is an informational message only. No user action is required.
    2014-11-04 18:03:23.79 spid53 Using 'xpsqlbot.dll' version '2011.110.2100' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
    2014-11-04 18:03:24.72 spid54 Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
    2014-11-04 18:03:24.78 spid54 Using 'xpstar.dll' version '2011.110.2100' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
    2014-11-04 18:03:27.74 spid53 Starting up database 'Argus'.
    2014-11-04 18:28:12.10 spid52 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
    2014-11-04 18:28:12.13 spid52 Using 'xplog70.dll' version '2011.110.2100' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
    2014-11-05 00:00:26.82 spid18s This instance of SQL Server has been using a process ID of 2540 since 31/10/2014 12:19:24 p.m. (local) 31/10/2014 06:19:24 p.m. (UTC). This is an informational message only; no user action is required.

    Sorry i feel so stupid. Here it is.  I can clearly see the errors now
    2014-11-05 10:49:47.43 Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)
    Mar 29 2009 10:11:52
    Copyright (c) 1988-2008 Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
    2014-11-05 10:49:47.43 Server (c) 2005 Microsoft Corporation.
    2014-11-05 10:49:47.43 Server All rights reserved.
    2014-11-05 10:49:47.43 Server Server process ID is 4596.
    2014-11-05 10:49:47.43 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware Virtual Platform'.
    2014-11-05 10:49:47.43 Server Authentication mode is MIXED.
    2014-11-05 10:49:47.43 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
    2014-11-05 10:49:47.43 Server This instance of SQL Server last reported using a process ID of 5720 at 05/11/2014 10:28:35 a.m. (local) 05/11/2014 04:28:35 p.m. (UTC). This is an informational message only; no user action is required.
    2014-11-05 10:49:47.43 Server Registry startup parameters:
    -d c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\master.mdf
    -e c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG
    -l c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
    2014-11-05 10:49:47.44 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-11-05 10:49:47.44 Server Detected 2 CPUs. This is an informational message; no user action is required.
    2014-11-05 10:49:47.46 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
    2014-11-05 10:49:47.49 Server Node configuration: node 0: CPU mask: 0x0000000000000003 Active CPU mask: 0x0000000000000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
    2014-11-05 10:49:47.50 spid7s Starting up database 'master'.
    2014-11-05 10:49:47.59 spid7s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'.
    2014-11-05 10:49:47.60 spid7s SQL Trace ID 1 was started by login "sa".
    2014-11-05 10:49:47.60 spid7s Starting up database 'mssqlsystemresource'.
    2014-11-05 10:49:47.61 spid7s The resource database build version is 10.00.2531. This is an informational message only. No user action is required.
    2014-11-05 10:49:47.67 spid7s Server name is 'WIN-3FNEFF25D4V\SQLEXPRESS'. This is an informational message only. No user action is required.
    2014-11-05 10:49:47.67 spid10s Starting up database 'model'.
    2014-11-05 10:49:47.68 spid7s Informational: No full-text supported languages found.
    2014-11-05 10:49:47.68 spid7s Starting up database 'msdb'.
    2014-11-05 10:49:47.76 spid10s Clearing tempdb database.
    2014-11-05 10:49:47.83 Server A self-generated certificate was successfully loaded for encryption.
    2014-11-05 10:49:47.83 Server Error: 26023, Severity: 16, State: 1.
    2014-11-05 10:49:47.83 Server Server TCP provider failed to listen on [ 'any' <ipv6> 1433]. Tcp port is already in use.
    2014-11-05 10:49:47.83 Server Error: 17182, Severity: 16, State: 1.
    2014-11-05 10:49:47.83 Server TDSSNIClient initialization failed with error 0x2740, status code 0xa. Reason: Unable to initialize the TCP/IP listener.
    2014-11-05 10:49:47.83 Server Error: 17182, Severity: 16, State: 1.
    2014-11-05 10:49:47.83 Server TDSSNIClient initialization failed with error 0x2740, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors.
    2014-11-05 10:49:47.83 Server Error: 17826, Severity: 18, State: 3.
    2014-11-05 10:49:47.83 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2014-11-05 10:49:47.83 Server Error: 17120, Severity: 16, State: 1.
    2014-11-05 10:49:47.83 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

  • Changing sql server service and sql server agent service startup account in SQL Server hosting SharePoint DB

    Hi 
    i have a sharepoint deployment with one SQL Server (running on VM) hosting the config DB and another SQL Server (Physical Host because VM was running out of space) to host the huge Content DBs. I need to schedule automatic backups of the Content DBs to a
    network share. For that i need to run the SQL Server Service with an account having permissions to the share as suggested in https://support.microsoft.com/kb/207187?wa=wsignin1.0
    I tried changing the logon as a service account to a domain
    account which has permissions to the Network Share and is also in local Administrators group of SQL Server and has "public and sysadmin" roles in SQL Server but that caused an issue. the SharePoint Web Application started showing a White Screen so
    I had to revert back to the default accounts i.e. NT Service\SQLSERVERAGENT and NT Service\MSSQLSERVER. I viewed the event logs . These are the types of error i got after changing the logon as a service account to a domain account
    1) Information Rights Management (IRM): Retried too many times to initialize IRM client. Cannot retry more. Retried times is:0x5.
    System
    Provider
    [ Name]
    Microsoft-SharePoint Products-SharePoint Foundation
    [ Guid]
    {6FB7E0CD-52E7-47DD-997A-241563931FC2}
    EventID
    5148
    Version
    15
    Level
    2
    Task
    9
    Opcode
    0
    Keywords
    0x4000000000000000
    TimeCreated
    [ SystemTime]
    2015-02-02T04:46:04.750899500Z
    EventRecordID
    176477
    Correlation
    [ ActivityID]
    {8FACE59C-1E17-50D0-7135-25FDB824CDBE}
    Execution
    [ ProcessID]
    6912
    [ ThreadID]
    8872
    Channel
    Application
    Computer
    Security
    [ UserID]
    S-1-5-21-876248814-3204482948-604612597-111753
    EventData
    hex0
    0x5
    2)
    Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below.
    The target principal name is incorrect.  Cannot generate SSPI context.
    System
    Provider
    [ Name]
    Microsoft-SharePoint Products-SharePoint Foundation
    [ Guid]
    {6FB7E0CD-52E7-47DD-997A-241563931FC2}
    EventID
    5586
    Version
    15
    Level
    2
    Task
    3
    Opcode
    0
    Keywords
    0x4000000000000000
    TimeCreated
    [ SystemTime]
    2015-02-02T07:01:35.843757700Z
    EventRecordID
    176490
    Correlation
    [ ActivityID]
    {50B4E59C-5E3A-50D0-7135-22AD91909F02}
    Execution
    [ ProcessID]
    6912
    [ ThreadID]
    5452
    Channel
    Application
    Computer
    Security
    [ UserID]
    S-1-5-17
    EventData
    int0
    0
    string1
    The target principal name is incorrect. Cannot generate SSPI context.

    Hi Aparna,
    According to your description, you get the above two errors when scheduling backups of Content DB. Right?
    Based on those two error messages, they are related to the service principal name(SPN) for SQL Server service. Please verify the if the SPN is registered successfully. You can view it in ADSI Edit or use command line. Please see:
    http://blogs.msdn.com/b/psssql/archive/2010/03/09/what-spn-do-i-use-and-how-does-it-get-there.aspx
    When installing SQL Server, those two services below should be registered:
            MSSQLSvc/servername:1433      
            MSSQLSvc/servername
    Please check if those SPNs or duplicated SPNs exist. You can use command to reset SPN or remove duplicated SPN and add new one. See:
    Setspn.
    We have also met this issue when this SPN is registered under Administrator. Please try to register it under Computer. You can add it in ADSI Edit.
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Sql server agent job failing

    Hi, I created a ssis package, that simply transfer an excel sheet into ole db, it works on its own, but when I try to use the sql server agent service, the first step is successful,but the second step of execution is not, but I don't have enough details
    to check the problem.
    when I check the database , a table is created, with only the column headers, but no rows.
    please can some one guide me. cheers.
    this was in the error log, i checked, and imake sure the file dtx, or the excel was not opened, but what i dont know is about the file permission
    ,ssa3,Error,1,USER-PC,ssa3,ssas3,,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:  11:38:23
     Error: 2014-10-23 11:38:23.34    
    Code: 0xC0202009     Source: Package Connection manager "Excel Connection Manager"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is available.
     Source: "Microsoft JET Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Jet database engine cannot open the file 'C:\Users\User\Desktop\dup.xls'.  It is already opened exclusively by another user<c/>
    or you need permission to view its data.".  
     Code: 0xC020801C     Source: Data Flow Task Excel Source [2]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection
    Manager" failed with error code 0xC0202009.  

    You can also create a proxy account in sql agent with required permissions to folder etc and configure it to run the job so that it always works
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    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

  • [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

  • Problem Running SSIS Package with a SQL Server Agent

    SQL Server: SQL Server 2012
    VS: Visual Studio 2012
    Hello,
          I have been having a problem running SSIS packages by using a SQL Server Agent job. I first created these SSIS packages in a separate IS project in Visual Studio. I imported the packages to the Integration Services (Package
    Store) instance on my SQL Server and tried to create a job that would run them from there.
          At first I read around about needing a proxy account to allow the agent/packages to access the file system since these packages are importing data from a flat file in the SQL database. So I created a temporary admin user to
    use as the user for the agent. I did this by going to Services.msc on the server and linked the account the agent's "logon as". Then arose another issue where I am getting an error about using the incorrect type for my connection managers.
    The connection manager "TestFile" is an incorrect type.  The type required is "OLEDB". The type available to the component is "FLATFILE". Source: Data Flow Task Flat File Destination [2]     Description:
    Cannot open the datafile "O:\*****\Success.txt"
    I am not sure what this even means as I am getting this error even with a test package that doesn't do anything with the database. I have just two flat file connection managers  in this test project one for grabbing the source file and one for
    creating the new test file.
    I am not sure what to do.
    Thanks in advance,
    Matt

    I accidently created two posts. The newest one has the details.
    I did not mean to.
    SQL Server: SQL Server 2012
    VS: Visual Studio 2012
    Hello,
          I have been having a problem running SSIS packages by using a SQL Server Agent job. I first created these SSIS packages in a separate IS project in Visual Studio. I imported the packages to the Integration Services (Package
    Store) instance on my SQL Server and tried to create a job that would run them from there.
          At first I read around about needing a proxy account to allow the agent/packages to access the file system since these packages are importing data from a flat file in the SQL database. So I created a temporary admin user to
    use as the user for the agent. I did this by going to Services.msc on the server and linked the account the agent's "logon as". Then arose another issue where I am getting an error about using the incorrect type for my connection managers.
    The connection manager "TestFile" is an incorrect type.  The type required is "OLEDB". The type available to the component is "FLATFILE". Source: Data Flow Task Flat File Destination [2]     Description:
    Cannot open the datafile "O:\*****\Success.txt"
    I am not sure what this even means as I am getting this error even with a test package that doesn't do anything with the database. I have just two flat file connection managers  in this test project one for grabbing the source file and one for
    creating the new test file.
    I am not sure what to do.
    Thanks in advance,
    Matt

  • 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

  • Not able to run the SSIS package in SQL Server Agent Job in SQL 2012

    Hi,
    I scheduled a job (SQL SERVER AGENT) which will call my SSIS package. This package will execute 5 packages in loop.
    When I execute this job I am getting error as below
    ============================================================
    Started  : 12:30:19 PM 
    Error  : 2014-01-23 12:30:20.37    
    Code  : 0xC00220EC    
    Source  : Execute Package Task     
    Description : Error 0x80070005. Failed to create an instance of empty child package.
        The Distributed Component Object Model (DCOM) configuration or the installation of SQL Server Integration Services,
        may be corrupted on your machine.  End Error 
    Error  : 2014-01-23 12:30:20.37    
    Code  : 0xC00220DE    
    Source  : Execute Package Task     
    Description : Error 0x80070005 while loading package file "D:\SSIS\RetailMobileApp\Staging_Pkg\stg_Category_Master.dtsx". Access is denied.End Error 
    DTExec  : The package execution returned DTSER_FAILURE (1). 
    Started  : 12:30:19 PM 
    Finished : 12:30:20 PM 
    Elapsed  : 1.123 seconds. 
    The package execution failed. 
    The step failed.
    ============================================================
    In the STEPS I have selected as follows:
    Type  : SQL Server Integration Services Package
    Run as: SQL Server Agent Service Account
    Package Source: File System
    What config I need to check here ? This job is not able to access the package stored in the folder.
    Sridhar

    Thanks for your reply. I had created credentials and used this while creating the Proxy account. With the Proxy account I am able to execute the Job Successfully. Concern here is I used my NT account to create this Proxy. Suppose If I left from the
    current project if some one is coming to this project later they need to change the credential with their NT account and run the JOB? Is this right way or we an create any other account in common? If so how?
    Sridhar

  • SSIS Package Runs OK Manually But Not From SQL Server Agent...Permissions?

    I have a problem where I have an SSIS package (SQL Server 2005) that won't run properly from SQL Server Agent, but it runs fine when kicked off manually from Integration Services -> Run Package or when run in debug from Visual Studio.
    The first step in the package checks for the existance of a file via a script task.  The script looks like this...
    Code Block
    Public Sub Main()
    Dim TaskResult As Integer
    Dim ImportFile As String = CStr(Dts.Variables("BaseDirectory").Value) + CStr(Dts.Variables("ImportDirectory").Value) + CStr(Dts.Variables("ImportFile").Value)
    If Dir(ImportFile) = "" Then
    Dts.TaskResult = Dts.Results.Failure
    Else
    Dts.TaskResult = Dts.Results.Success
    End If
    Return
    End Sub
    This script runs fine and the file is seen as expected when I run the package manually.  But as a step in a SQL Server Agent job, it doesn't see the file.
    The SQL Server Agent service is set to start up / log on as a Local System Account.  I've also tried setting up a credential / proxy (using an account that I know can see and even move / rename the file) to run the job as but that didn't seem to help.
    The package is being run from SQL Server (stored in MSDB) and is set to rely on SQL Server for sensitive information, so I don't think that's an issue; other packages are set up like this in terms of sensitive data and run fine.
    Any ideas why my script can't "see" the file I'm looking at when it's kicked off by SQL Server agent?  I've looked and looked...I can't seem to figure this out.  I would really appreciate any help you might be able to offer up.

    If the variables are fine, then I think it is very likely that this is security related. Since the Agent is running under the local system account, have you verified that the local account can access the file? When you tried the proxy account, are you positive that it was set up properly, and that the account had the permissions to read the file?
    Another thing to check - is this a local file or is on another computer? If it is on another computer, make sure you are using a UNC path and not a mapped drive.

Maybe you are looking for

  • The Table.Column does not exist on the rowset

    Hi I have the following issue: I keep getting a message in Power BI Designer Preview that states: The 'collections.Name' column does not exist in the rowset. I have a MySQL DB connected to an Access DB and then I've created and saved a query within A

  • I'm a UK Itunes user and during a recent trip to the USA I bought a track on US Itunes. Now I'm back in the UK how do I download it from my ITunes?

    Dear All, During a recent trip to the USA my daughter somehow managaed to download on her Itouch a song which appears to not be avaliable on UK Itunes. Therefore a couple of questions arise here. Firstly how did she manage to download this track as I

  • Wifi disconnect issue w new Mac

    I bought a new Mac about a week ago.  Right away I started experiencing wifi disconnect issues.  I called customer support line and they had me reset the eprom.  I don't recall the key sequence now. The problem went away for a week but has now return

  • Same values for different address in BP

    Hi Guys, How to popup the standard (current) communication address details into new communication address details. Scenario:  The exited BP has one address and now he moved to another address, in that case we suppose to update or maintain his new add

  • Compatibility view

    in IE8 tools the compatibility view has to be checked for a web page to work how do i find the compatibiiltiy view in firefox 4.0.1 the web sit will not work in firefox . It did not work in IE 8 until i set it to compatibilty view how do i do this in