Quantcast
Channel: Questions in topic: "sql-agent"
Viewing all 80 articles
Browse latest View live

How can I deliberately crash a SQL service?

$
0
0
(I *thought* that would get your attention!) I had a SQL Agent service stop unexpectedly and I didn't find out for a couple of days. So I've found out from a previous question how to set up a PowerShell script to run when the service crashes. The script sends me an email and works fine when I run it, but who knows what context it will run under if this really happens and whether the email will still be sent. So do you know how I can deliberately crash one of the SQL-related services on a 2008 R2 instance please? Any of them would do: SQL Server, SQL Agent, Reporting Services etc. Be as diabolical as you like but something that's reversable!

Schedule Executable File From JobAgent Sql 2005

$
0
0
How do you schedule an executable file to run in SQL Job Agent, SQL 2005?

SQL Job Output file - Can I append datetime?

$
0
0
Hello, So I have a simple select statement running at a specified time everyday. I'd like to append the current date and time to the output file. Is it possible to achieve this in the 'JOB STEP' properties under the 'Command Line' tab?

Sql server Jobs Kick Start

$
0
0
Hi , I have around 20 jobs in my agent. Each time when i restart my job i need to restart all the jobs.Is there any easy way around using a sql query instead of doing this one by one. Thanks in Advance. Kannan

How do you add a "Run as" user to a SSIS Package Step?

$
0
0
I am trying to set up a duplicate SQL Agent/SSIS job in our development environment to one we have inherited in production. The job step is of type SQL Server Integration Services Package, and we get three options in the "run As" drop down, "SQL Server Agent Service Account", "User A" & "User B". I want to add a third user, "User C" as a possible account to run, but I cannot figure out how to add the user. "User C" has rights on the server as well as having a Credentials entry. What am I missing?

SQL Server agent

$
0
0
SQL Server 2008 R2 web edition SQL server agent will not start. Trying to run under network service which is the same as SQL server. SQL server is running fine. Every retry NO SQL agent log no entry in application or error log. Have tried to run it as local system still no joy. It was shut down on 12/3/2011 and never restarted now it won't start

list of sql jobs on the server

$
0
0
I need a query to find the list of sql jobs on the server . What is the query

Server Agent Job Logs

$
0
0
I've got a server agent job scheduled to run every morning. This job contains about 15 steps and one of the steps uses an SSIS package which get data from an iseries database. Occasionally this job fails and I can't tell why. Is there some kind of log recorded that will tell me exactly how far through the job got and why it failed. Many thanks for any help. Stuart.

Argument "Server1" for option "connection" is not valid. The command line parameters are invalid. The step failed.

$
0
0
I have a SSIS package run fine in BID, but when run as a sql agent job, it failed at the error: Argument "Server1" for option "connection" is not valid. The command line parameters are invalid. The step failed. In Job Step Properties, Configuration, Command files, Execution options, Logging, Set Values, Verification tabs do not have anything set. The only change made is in Data Source tab, the server name is changed to server2 ,so is in Command Line tab changed accordingly. But, somehow, it still points to the connection inside of the package. If I change the connection in the package, then create a new job point to the changed package, then it runs fine. Why changing DataSouce in the job properties will not take effect? Here is what is Command Line tab: /FILE "C:\ Conv_01.dtsx" /CONNECTION "Connection001";"\"Data Source=server2\SQL2008;Initial Catalog=FO;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{849C75AD-4693-4DF2-9EC7-73C347FEE10C}HEC_1.US-Iv2.5;\"" /CONNECTION " Connection002";"\"Data Source=server2\SQL2008;Initial Catalog=ULL;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{D399B84F-1467-41C3-A292-5B27789B66A3}HEC_EL1.ULL;\"" /CHECKPOINTING OFF /REPORTING E in Set Values tab,I set I set Properties Path to: \Package001.Variables[User::ConnectionString001].Properties[Value] and Vaule is the actual connection string. but still got the same error.

SQL Agent does not restart automatically on reboot

$
0
0
I have SQL Server 2008 set up on Windows Server 2008.I use LocalSytem account as service account for both SQL Server Engine and SQL Server Agent.When ever I reboot server the SQL Server engine starts automatically but SQL Server Agent do not.However I can start SQL Server agent manually without any error. When I check the SQL Server error log it is some things as follows : Logon to server 'local' failed SQL Server Error 848,Cannot generate SSPI context. SQL Server Error 848,SQL Server Network interfaces : The system detected a possible attempt to compromise security.Please ensure that you can contact the server that authenticated you [SQLSTATE HY000] SQL Server Erro 773 Client unable to establish connection. SQL Server Error 773 SQL Server Network Interface : The requested security package does not exist. Any help is highly appreciated. Anupinder Rai

How would I send out a backup to another server from SQL Server Agent?

$
0
0
Hello All, I have a job that creates backups of one database on a daily basis. I need to know how I could send this backup to a drive on another server. At first I tried to replicate the database all last week but with no success. I am technically a begginer with SQL Server 2005 and SQL Server 2008 so please bear with me. Any help on this situation would be appreciated.

Stability problem for Excel commander report using RDBMS and OLAP

$
0
0
Hi All. I have not much experience in Business intelligence area. I am facing a problem in regarding stability of a report. We are providing the Business users an Excel report in Retail Sales Reporting with Dynamic filtering options, with multiple sheets/tabs in for different geographical, product and time hierarchies. The report is using two Stored Procedures which are going to the Relational database and OLAP database to collect the data. The report is being started by Sql Agent scheduled job, which starts an Excel commander and then Excel commander starts the stored procedures to collect data and then populate the data in a predefined Excel file layout with multiple sheets/tabs. Of course the Excel file is using the macros (vba). The problem of this solution is the stability or the reliability of the report execution. Many times the report crashes without giving any error message or sometimes it takes too much time to execute so we have to restart it. Any idea about how we can get a better degree of reliability / stability. We are even thinking to replace this report generating method for the sack of stability but Excel is must part for its ability of offering of dynamic filtering and multiple tabs/sheets. I would be very thankful for your Ideas for the improvement of the situation, especially my humble request to Experienced and Seniors.

SQL2008 Express affecting SQL2008R2 agent

$
0
0
Anyone experienced this scenario before? I have a SQL2008 R2 standard server with 2 instances. SQL Agent service runs under a domain account, specifically created for running SQL services. Has been running fine for months. Last week I noticed that someone had installed SQL 2008 Express, more accurately, someone had installed Visual Studio which in turn had installed SQLExpress! In an effort to clean up the server, I stopped the SQL Express server service. Then I noticed that the agent service for one of the instances was stopped. Any attempt to start it failed, with no error messages in either the console, the windows event logs, the sql error logs - nada! The agent service on the other instance (using same config) was fine and would happily restart on demand. I tried all kinds of fixes (http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/24a9d481-7251-425a-ac02-2ef627ef6738/) but all to no avail. Decided to (for no reason) restart the SQLExpress instance. Then tried the failed Agent service - it worked! What on earth does the install of SQL Express 2008 alongside a SQL2008R2 do to one of the instances? Why does the SQL2008R2 service have a dependency on the SQL2008 express server service?

SQL agent job not deleting a file via ssis

$
0
0
Dear All, I have a SSIS package that deletes older log files from a location. The logic is based on modified date. It works fine when it is executed manually but when it is scheduled via a SQL Server Agent job, it doesn't deletes the files at specified location. The job terminates successfully and there are no errors displayed. Any help in this regard would be very helpful. Regards, Rafayz

I need to delete a file from one particular path.

$
0
0
Hi, My job is automate the trace for our customer. so, i will start the trace automatically through a schedule job. This job will save a trace in the particular path Eg: C:\Trace\Full_Performance_Trace_Mon.TRC Note: Here the path is C:\Trace, Trace will automatically create the file names like Full_Performance_Trace_Mon , Full_Performance_Trace_Tue, Full_Performance_Trace_Wed... on with respect to the today's day. Now, My problem is say now I'm running the trace the new file Full_Performance_Trace_Tue will get saved today. Now, if i again run the trace the job comes with the error message stating that the file is already available. So, i need to write a query through CMD shell if a file is already available in the location go if it is on today's day then the new file should incremented to Full_Performance_Trace_TUE1 else i need to delete the file.. for deleting the file i can use this [exec sp_trace_create @TraceID output, 0, @filepath, @maxfilesize, @stoptime] But, i need a condition for deleting a file. Thanks for the help any question let me know. Thanks Satish

How to do documenation of sqlagent jobs

$
0
0
Hi All, How can I do documentation of SQL agent Jobs in 2000 ? Thanks

Manage sql server agents jobs

$
0
0
How do we manage the SQL Server Agent Jobs automatically in SQL 2012 when we attempt the Failover between primary and secondary Nodes?

SQL 2k5: How to determine memory usage for each job

$
0
0
Windows server 2003 SP1. SQL server 2005 SP3. We have a number of jobs executing under SQL Agent, around 30. Every 10 to 20 days, the SQL agent starts gobbling huge amount of memory, probably following an error. When it happens, the SQL Server begins showing slow response and denies new logins. Some jobs can not start. We search the culprit job but often wind up rebooting the server to clear everything. My question is: how can I determine the memory usage for each job running under the SQL Agent? Hopefully, I can then narrow our search and find the problem. Thanks Steve

Why can I use the cmd.exe on a vbs file but not a bat file?

$
0
0
I am using SQL 2008 R2 on Server A. In a SQL job, I set the following command to execute on a different server. **cmd.exe /c "\\\\mchsbiess01p\\Scripts\\Test\\TestEmailUtility.vbs"** with success. when I use **cmd.exe /c "\\\\mchsbiess01p\\Scripts\\Bat\\Planning\\RunPullLawsonLoad.bat"** I get the error "Executed as user: MCHSNT\\SPSQLS1. C:\\Windows\\system32>D: D:\\>D:\\Oracle\\Middleware\\user_projects\\epmsystemEss01P\\EssbaseServer\\essbaseserver1\\bin\\startMaxL.bat -D D:\\Scripts\\Maxl\\Planning\\PullLawsonLoad.mxls 581060833,1161870527 The system cannot find the path specified. Process Exit Code 1. The step failed." I have verified the path on server mchsbiess01p, but it seems the command is executing on the sql server A, not the specified server mchsbiess01p. Can someone help? thanks, Maggie

SQL Procedure working when run manually, not running from sql server agent

$
0
0
I have a procedure that runs fine using the execute command in SSMS, however putting the same command in a job gives the following error.> line 9, character 9, unexpected end of input The code takes a very long XML string in UTF-8 encoding and puts it into a single nvarchar(max) cell. Then puts this string into a XML cell in a different table, allowing me to query the individual parts of the XML code using the nodes function. I cannot put the data directly into a nvarchar cell due to encoding differences. **I can't reproduce the string here as it is very very long.** I'm just looking for ideas really as to where it might be going wrong. Here is what I know so far: The procedure runs without issue when executed manually I have checked permission issues, and that doesn't seem to be the problem. The agent runs under my own account and I am a sysadmin on the database I split the procedure into seperate parts to locate exactly where the problem is occuring. Once again the seperate procedures run fine when executed manually but an error occurs when run through SQL Server agent. When the query is run seperately through SQL Server Agent it gives a slightly different error. This leads me to believe it is an encoding issue. However I am getting the XML from a webpage and I can't change the encoding on the webpage. line 1, character 38, unable to switch the encoding I know this is a long shot since you can't replicate the issue but if anyone could give an idea as to where to start looking for an answer, it would be greatly appreciated.
Viewing all 80 articles
Browse latest View live


Latest Images