SQL Server Management Studio commands latency - sql-server

I noticed, while trying to run an UPDATE script on a remote DB server geographically dislocated in another country, that the command executes successfully in about 1 hour if I run it from Management Studio on my local machine. If, instead, i run it directly on Management Studio that is installed on the server, it takes about 10 minutes to execute.
So, my question is: is latency important even if there is no "data traffic" generated by my command? I would expect latency when i execute an INSERT or SELECT command because there is effectively data that has to be sent from one machine to the other. That's not my case because the UPDATE commands i'm executing don't produce any output and don't have input data inside them.

Related

SQL Server will not work after windows update

My Windows 10 machine insists on doing an update every so often after which MSSQL Server will not start. When I try and start it manually from services I get the following error:
Windows could not start the SQL Server () service on Local Computer. Error 2: The System cannot find the file specified
The only way to rectify it is to undo the last update from the updates panel in windows. But every couple of days I come back to it and the update has executed again. Any ideas on how to trouble shoot the above error?

SSIS in SQL 2014 running an Execute Process Task failing

Running a Cmd.exe inside an ETL Process Task and it's failing with Exit code 1.
If I run the command as the same user I'm running the SQL Agent job as outside of the ETL it's running fine and giving Exit code 0.
I've seen some DCOM errors in Event Viewer and Ive taken steps to give permissions to the user I'm running the ETL through the SQL Agent Job for. However it's still failing.
Are there other things I should check about running a CMD command across servers as a specific user?
Just to say this was a permission issue ultimately for it to write a file inside the Default folder. It wasn't manifesting as such until I dumped out the Log a little more. I had to make the user I was running the agent job to be a part of the Administrators group on the SSIS server to allow the process to work.

SSIS package executed in Server agent doesn't do its work (even while reporting success)

I have to say that I hate myself for such general question as "What I am doing wrong?" but I simply have no idea what can be the problem:
I've created SSIS package that takes the data from flat files (CSV), counts the average on one of the columns, groups by date and writes it to the database and deletes the original file. All works fine when executed within SSIS, but when I am scheduling it within Server Agent it simply doesn't work - log reports success but there is no new data in the database and the .csv file exists in its original location.
I know the problem with protection level set up in SSIS, so I've changed it to "EncryptAllWithPassword" and I use the same password with Server Agent.
Here is a link to the Server Agent Job script (created as "script job as DROP and CREATE")
Edit: Just to make things weirder, using
dtexcec /f {filepath} /de {password}
executes program without problem. I know I can shedule such command in the Windows itself, but i'd like to keep all scheduled jobs in one place - in the Server Agent
EDIT: Solved by changing the path to UNC
There are two important things to remember when setting up packages to run via a SQL Server Agent job.
Use UNC paths for all file locations, no matter how simple. There is a high probability that the server will have a different view of the file structure than your development machine, so UNC paths ensure that both machines are referencing the same paths.
Use a proxy account to execute that package, as described here http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/.
The proxy account must have access to the physical paths and the server objects.
This also allows for security stratification on your various packages (not all packages need access to everything).

query to connect to another instance of Another SQL sever not using linked server or SQLCMD mode

i dont want to use SQLCMD mode or addlinkedserver...i m creating a sp which will fire from central server and collect the data from multiple server...i just want query..
query to connect to another instance of Another SQL sever not using linked server or SQLCMD mode so that I can just paste that in the top of the create script and F5 to run it and it would switch to the new server and run the create script.
I dont want to use SP_addLinkedserver i.e. i dont want to link the server....I just want to Connect to that server....
You can use a Server Group which allows you to run a script against multiple servers. See Create a Central Management Server and Server Group. The good thing is that the queries are run concurrently, not serially, and the result sets are concatenated by SSMS into a single result set. For interactive queries it works OK. The bad thing is when you have failures the retry and rerun can be tricky.
For automation though using SQLCMD mode or PowerShell cmdlets is a far better alternative.

Database script not executing

In my sqlserver 2008 R2
I have a database script which generate successfully, but when I am trying to execute that script its only shows Executing query message and nothing happen.
I had waited at-lest 10 minutes for result but force fully I have to stop executing that query.
Note: All other queries are working normally, but only database script is not executing as explained above.
I doesn't know what's going on...
More details: This thisng is not happen on particular DataBase, it is make problem to all the database of my sqlserver.
Even no any single DataBase's script working, as explain below.
Its being remain to show Executing queries...

Resources