SQL Server 2012 -
I have a package that copies data from one server to another. I then have an Execute Process Task to run a batch file. When I debug the package in Server Data tools it runs perfect but from the SQL agent the batch file does not run at all and no errors. I created a proxie user and grated all the permissions I can just to get it to work but still does not run. I am actually trying to execute an exe file and read somewhere that SQL server agent does not allow interactive applications so I tried it with a batch file.
Related
We migrated to a new Windows Server 2019 Data Center and need to execute a stored procedure every night. We're also using SQL Server version 15.0.2080.9
We were successfully doing this on the old server for many years. If I double click on the bat file everything runs as expected but when this bat file is run from Task Scheduler nothing happens from Task Scheduler.
Here's the bat file:
sqlcmd -E -S MyServer -d MyDatabase -Q "exec [dbo].[spzTestLog_insert]"
The task runs under a Windows Server administrator user account which is also assigned as sa in SQL Server.
Running from a SQL Job is not an option. I have over 20 scripts that have to be executed in sequence, most are Python scripts processing GIS data in another server and intermittently I have to run SQL scripts importing and processing data from the GIS server.
Any idea why this is not working?
I have a SSIS that execute a .exe app with an Execute Process Task. It runs successfully from the VS 2012, but when I deployed the SSIS to a Integration Catalog and if it fails the Job holds up the exe file so I need to reboot the server to unlocked it. How can I prevent this issue?
We have developed SSIS package which had target framework SQL Server 2014.
Package has 2 states:
1. Which truncates the required SQL Table.
2. Pull data from SharePoint list data by hitting Service call and dumps data to truncated sql server table.
Latter on some SQL Server 2016 upgrades been done on server from IT department. So Dev team has to change target version in SSIS to SQL Server 2016. Which is working fine from SSDT tool (All states executes perfect).
The generated ".dtsx" I found in "~/obj/Development" path in source code directory. Then we developed the the batch file which is targeting to execute generated .dtsx file. If we executes the batch file as administrator it doesn't works, takes amount of time and shows "Operation TimeOut" at the end. Why should this is happening, any clue ?
I have several SSIS packages that launch external programs either batch programs for things like SFTP or VB Scripts for older programs. These work perfectly in BI Development manager but once they are packaged and sent to MS Agent they appear to run fine with no errors but the system just seems to skip those tasks and they don't appear to run.
This happens both when the agent runs these as scheduled or when you manually trigger
Any advice would be helpful.
I have written an sql script for updating a database that runs in SQL server 2005.
I want to make those changes to the production DB server but I dont want to run the query from the query analyzer. Is there a way to run the sql script from a console?
create a batch file that points to the script or scripts that you created and run that batch file.
Here follow this tutorial link
You can use sqlcmd. It gets installed together with installing the Query Analyzer.
The sqlcmd utility lets you enter
Transact-SQL statements, system
procedures, and script files at the
command prompt, in Query Editor in
SQLCMD mode, in a Windows script file
or in an operating system (Cmd.exe)
job step of a SQL Server Agent job.
This utility uses OLE DB to execute
Transact-SQL batches.