Is it possible for script to run on its own on sql server when connection closes without sql server agent?
I'd like to start for example long insert script from ETL and have it run through the night without logging into remote server and running that there.
SQL Server Agent is doing the work at the moment but it would be nice to dynamically adjust those scripts in ETL software without having to change job steps in agent.
Hope there is just some obvious trick which hasn't crossed my mind :)
Related
I think this should be simple but I cannot really find a way to do it. I have some devs connecting to a remote SQL Server 2017 using SQL Server Management Studio. Sometimes they need to run queries that take several hours to complete.
However, their laptops go to sleep if they leave them overnight which sometimes breaks the process. I do not want them to RDP to the server. Is there a way (without server/SQL admin intervention) for their queries to run persistently on the server instead of their local laptops?
I know, they could just set up their laptops to just do not go to sleep. However, that is a security policy in the company and it is a huge pain in the butt to ask for a laptop to be excluded from it.
Any suggestion is welcome.
Thanks!
What kind of database is it? For example... If an MS SQL Server then you can use an SQL Server Agent which run scheduled jobs (with tasks). Is it Azure? Then use an Elastic Job. Figure that out first before you waste your time looking into a tool that is not right for your database.
We have an SQL Server 2014 with a lot of Jobs that are scheduled every 12AM. They are around 70-80 jobs that will run at 12 AM. All jobs run successfully, then we just noticed that we can no longer access the SQL server on a client workstation, nor telnet the port of the SQL. The services are still running but when we try to restart the SQL Service, it does not restart successfully. The only way to make this work again is to restart the server.
This is now happening for 3 days straight and we cannot isolate what may be causing this.
We have checked all the logs in SQL and even the event logs of the windows but there is nothing to show about any error that may cause this.
There is no any scheduled task outside SQL Job that are scheduled at midnight.
Hope you can help me as this is a big issue on us since this is a production server and we cannot avail to have the server to restart every day.
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 6 ssis packages. All packages are for loading flat files into sql server table. I have created a sql server agent job to automate the flat file load process and put all packes exxecution in different steps. If the first file fails to load into the SQL server table, all the succeeding steps (packages) should not execute. Can I create a transaction to in sql server agent to do this?
Thank you for your help and time.
Change your job step to "Quit the job reporting failure" for the On Failure setting. No need for transactions at all.
Does the SQL Server Agent affect the performance of SQL Server?
Do I need to stop it to increase SQL Server speed!
If yes, please give me more details
The SQL Server Agent is a service which executes any jobs you have configured on the server. It will not inherently affect performance itself, as it's not running most of the time.
When it runs a job, the performance hit will be identical to if you were running the items in the job yourself.
If you were to disable it, you wouldn't be able to run any jobs. Probably not a great idea.