We are running SQL 6.5 sp5a. There have been a number of instances recently where some scheduled tasks don't complete. I can't even cancel them. The only way to stop them is to stop and start the Executive service.
Anyone come across this before and know what the problem is?
Hi all - I'm having problems getting a package to run successfully to completion when I schedule it in SQL Server or as a batch file on the Windows scheduler. If I run the package interactively or run the batch file interactively that contains the DTSRUN command it runs to completion. Both packages start with a call to a batch file that FTPs files from a remote server and then they continue on by executing additional DTS packages within the running package. The owner of all the packages involved and is the same user that I am logged in as when running the packages interactively and is the same user that that SQL Agent and the Windows scheduler job runs under. The FTP step of each package does complete successfully but then I cannot trace where the package then hangs. The package never fails but rather it just continues in a Executing/Running state. This is getting extremely frustrating. Any insight in to this problem would be greatly appreciate.
If I have 2 scheduled tasks set for the same time (perhaps accidentally), will the SQL Executive start 1 and queue the other one until the first is complete and then run the 2nd task? Or will they both be started simultaneously?
I have been running the following production job successfully for a long time. It now fails, and the Task History Last Error Message displays 'No Message'. The log file ( C:MSSQLLOGMaint_TombV50.txt) shows it ran successfully, with a Return Code 0.
To all, If I have a scheduled tasks that is owned by 'sa', how can I assign permissions to allow another user, even the database dbo, to register the SQL server and view the scheduled tasks?
Hi, I am using Windows 2000 and created around 15 scheduled tasks. My scheduled tasks supposed to run every morning. I have to set password to first scheduled tasks every morning; otherwise none of the scheduled tasks works. As soon as i put password in the scheduled tasks, other tasks work fine.
1) Is there a way to call a second task 'upon completion' of the first one. Or would I need to place the code of the second task in one task? (This is v6.5) I guess the main purpose is to avoid conflict & see if one fails, the other may succeed, etc. I generally like to keep diff tasks separate, but one is dependent upon the completion of the other.
2) I want to restore a db, upon completion of the backup of another db. They are on separate servers, but i know i can use remote sp's.
Any advice, help, code, scripts, etc, would be appreciated. Thank you.
Apologies if this has already been covered, but I can't find any information.
What is the easiest way to move a batch of scheduled tasks from one server/network to another? Can you script them up somehow and then reapply the script to the new location?
I'm running SQL Server 6.5 and have schedules a number of tasks to run overnight. This has generally been successful; even when the tasks have failed, it's been because of a lack of data in a feeder database system.
My problem is that when I try to run the tasks manually, I get a message saying that they can't be run because SQL Executive is not running on the server. Now, this ain't true. The little gizmos show green in the server manager, and if I right click on SQL Executive, 'Start' is disabled and 'Stop' is enabled.
Am I missing something here? Does anyone have any clues or suggestions?
I'm going crazy with EM's Sheduled Tasks. I've setup couple of backups and weekly maintenance plans from EM. After couple of days I viewed sheduled tasks from EM toolbar and found that all the tasks have not executed as I have scheduled. the task history does not show any history at all. Clicking refresh does not do any good either. However if i right click on the database and choose restore i see all the backups that i have scheduled. Is this a bug?
Is anyone aware of a way of adding scheduled tasks to MSDE?
Obviously in SQL Server you'd use the Enterprise Manager to do that, but I don't believe it is possible to get Enterprise Manager seperately from SQL Server.
What are peoples opinions on using SSIS as a "central repository" and replacement for all scheduled tasks. Example, we have a bunch of servers which we have installed services which we have written. Currently we have scheduled tasks on each machine to stop and start the services. One of my collegues is using SSIS to run a system which runs tasks on multiple machines by remotely running programs on other machines via scheduled tasks and then collects the data and puts it into a database.
He's now pitching the idea that we remove the scheduled tasks on each machine and start and stop our services via SSIS so that it's centralized. In addition, we can also check for holidays in our database before starting services. Since it doesn't seem like SSIS was meant for this type of use, I'm weary of using the tool to do something it wasn't intended for.
Any opinions? I'm also worried that the learnnig curve for everyone is going to be too high.
I googled this an I got wonderful resul... no, no I didnt. Could someone please provide a link or a step by step guide on how to schedule the running of SP's that will then send the results to an email address.
I recently changed the SA password on my SQL Server 6.5 installation and discovered that this had caused the Scheduled CmdExec Tasks (defined in SQL Executive) to fail with:
"Process Exit Code 1. Microsoft (R) SQLMaint Utility, Version 6.50.240 Copyright (C) Microsoft Corporation, 1995 - 1996 [Microsoft SQL-DMO] Error 4002: [SQL Server] Login failed"
Changing the password back to the original resolves the problem, but is a less than satisfactory solution.
Any advice on how I can change the SA password and allow CmdExec tasks to continue running would be gratefully appreciated.
I have a strange problem with a scheduled task failing with the following:
"Unable to send completion notification email to operator with email name '' for task 2780, 'Scheduled Update'"
This job is the same across several servers and the job runs on the other servers. This is a bit frustrating... I cannot seem to find the difference that is causing the problem.
The funny thing is that I am not using SQLMail or anything to notify anyone regardless if the job succeeds or fails.
I have some "phantom" tasks running, specifically, DB dumps to a NULL Pipe device and they are not scheduled!!! These do not show up in the SYSTASKS table, where can I look to possibly find these un-scheduled dumps? Thank you....
I schedule dbcc checkdb command in the SQL schedule task program at 3:00am. It ran successfully but since it ran as a schedule task, I don't know where to find the results. Can anyone help?
Would please any expert here give me any guidance about what Data Mining tasks can be automated and scheduled via Integration Services Packages? Also, If we automated the tasks, can we also automatically save the results of the tasks somewhere? Like if we automate assessing the accuracy of a mining model, then we wanna know the mining model accuracy later, therefore, we need to save all these results from the automated actions. Is it possible to realize this?
Thanks a lot in advance for any guidance and help for this.
What can I do to make OnComplete and OnSuccess mean something in SQL Server 2000 DTS?I have this pretty simple package that imports data into a table from an XLS file, then runs an external console application which manipulates the data and drops into a different table.That data is then used to create a CSV file. If I execute each step individually, the whole thing works. But what it happening is that the end file is being created before the console app is finished.I have a workflow line (on complete) between the 2 processes, but that doesn't seem to mean anything. To run the external app I am just using an active x script task...CreateObject("WScript.Shell").Run "my file" Any advice?
I have a SQL Server 7 box that is shortly to be rebuilt completely (still on NT4, but with new RAID system), does anyone have any advice on how I can make the transition as painless as possible? Particularly, I want to maintain the backup, security and DTS structures as much as possible.
'The Partial modifier is only required on one class definition per project. Partial Public Class StoredProcedures ''' <summary> ''' Create a result set on the fly and send it to the client. ''' </summary> <Microsoft.SqlServer.Server.SqlProcedure> _ Public Shared Sub SendTransientResultSet() ' Create a record object that represents an individual row, including it's metadata. Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128) )
' Populate the record. record.SetSqlString(0, "Hello World!")
' Send the record to the client. SqlContext.Pipe.Send(record) End Sub End Class
Given this code, how do I add other SqlMetaData Columns to the statement:
Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128) )
---
Like this???
Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128),New SqlMetaData("otherstringcol", SqlDbType.NVarChar, 128) )
how can i copy a complete database (tables, views, stored procedures) with/in the sql server 2005 "server mgm. studio". the import/ export function only copys the data (tables). sql server 2000 had a nice tool for that (import/ export data). but how can i do that with the sql server 2005. can't find anything ...
I have a delete statement that works on some servers/databases and not on others. I am running this on SQL Server 2000/Windows 2000. The statment is a very simple DELETE x FROM y WHERE x = 1234. It is only 1 record in one table. The staement begins but never completes. It looks as if it just keeps trying to recompile but goes nowhere. Have any of you ever seen this before? It works on a restore of the database on 1 server, but not on another. It will not run on either production server/database. Is there a parameter or setting that I need to look for that might be different and causing this? I am running the Enterprise edition of SQL Server on some servers, and standard edition on others. Would that make a difference? If so, how and why. I've never had this issue before. We are running Windows Advanced Server on most all of our servers.
Any help on this would be greatly appreciated. Thanks. Deanna
I am having trouble trying to import a big file (aprox 250Mb is size) into an SQL Server database and I keep getting the message:
"Not enough storage is available to complete this operation".
The application tries to import the file by executing a stored procedure:
CREATE PROCEDURE sp_updateMaterialBlob @MaterialId Int, @BLOB image AS BEGIN Update Material SET blob = @blob where id = @materialId END
The application uses an ADO connection. I've tried increasing the memory of the client machine but that didn't work. Whenever I do run the import, nearly all the memory on the machine is used up but every time after several hours I get the same error message. What is the cause of the problem and how do I resolve it? Ideally I want to use my application to do the import rather than anything bespoke.
I was given the task of writing a new website for my boss. problem being he wants the ability have a custom user signup form and then a picture gallery of service with comments listed off each one. I was also asked to produce this in .aspx with SQL. only one small glitch, never worked with either of them.... I have designed most of the database requirements off of examples I found online but have not found how to post data from the users signup form to the database correctly and retrieve it for the customers profile. any suggestions???? all help on this will be greatly appreciated
Hello all! A while ago I started cataloging my collection of old radio recordings and I wrote a simple Visual Basic 2005 program to display them in a nice UI. I have implemented an SQL database with the project and all is fine, when I run the program it connects to the sql server and downloads the data. But when I try and change something by connecting from within Visual Basic at runtime with this code:
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click Dim ConnectionString As New SqlConnection("Server=MARK-HOMESQLEXPRESS;Database=Library.mdf;Uid=MARK-HOMEMark;Pwd=sodoff;") Dim sqlString As String ConnectionString.Open() sqlString = "UPDATE JackBenny SET Rating='Excellent' WHERE [Episode Number]=" & epNumber ConnectionString.BeginTransaction(sqlString) ConnectionString.Close() End Sub
I get this error code in the log and a general unable to login error within Visual basic itself:
2007-11-22 15:44:39.78 Logon Error: 18456, Severity: 14, State: 5. 2007-11-22 15:44:39.78 Logon Login failed for user 'Mark'. [CLIENT: <local machine>
The state of 5 refers to "User ID is not valid." but I can login to SQL Server Management Studio Express just fine with the username and password in the code posted. Also of note, I can login to the Server Managment with the sa account username and password. When I use the credentials in visual basic code, same error. Any ideas? I am trying to connect to a database which is on this computer (local) in the root folder of the application, called Library.mdg.
I recently re-built my entire system from ground up (new hard drives, OS, etc). I now have the problem of SQL 2005 installed partially, but no way to get the management tools installed. I get an "already installed message when I try". I've never encounted this before on any other SQL install.
Sequence of events. I installed VS 2005 Pro first, then followed by SQL 2005. Somewhere this install didn't work, and I was left with the MS installed thinking I suceeded, yet none of the functions of SQL were worked or more importantly accessable.
I tried to re-install after using the ADD/Remove App from the control panel (which was sucessfull). SQL thought it was still installed. So I uninstalled VS 2005 as well, and deleted any programs in the SQL directory. Then I checked ADD/Remove programs and nothing was showing. The re-install still did not work. My guess is that the registry is still loaded with now useless entries.
Is there any solution left that does not require me to hand delete any SQL registry entries, since that is always a great way to completely kill my system.
How can I encrypt / decrypt whole database (data, objects ... everything) in SQL Server 2005 Express Edition? Quick solution from any champion of Databases would be highly entertained.
I get this exception after awhile of browsing thru my application, i dunno what causes this because it never happens in the same place. I would like to know if anyone else is experiencing this situation and if there is a solution.
SqlCeException Not enough storage is available to complete this operation.
em System.Data.SqlServerCe.SqlCeConnection.ProcessResults() em System.Data.SqlServerCe.SqlCeConnection.Open() em System.Data.SqlServerCe.SqlCeConnection.Open() em System.Data.Common.DbDataAdapter.QuietOpen() em System.Data.Common.DbDataAdapter.FillInternal() em System.Data.Common.DbDataAdapter.Fill() em System.Data.Common.DbDataAdapter.Fill()
I get department ,salary as input from a stored procedure . now i have to select all the employee no's from the department table. and based on that i have to select all the employee details from employee table whose salary is greater than given salary.
and the complete row should be passed as output parameter.
This cursor is fine
create procedure usp_proc (@dept char(10),@sal decimal (10,2),@emplist cursor varying output) declare @empid int DECLARE @getempid CURSOR SET @getempid = CURSOR FOR SELECT emp_id FROM department where dname = @dept OPEN @getAempid FETCH NEXT FROM @getempid INTO @empid WHILE @@FETCH_STATUS = 0 BEGIN select ename,dept,dob,doj,status,pos,sal from employee where empno = @emp_id FETCH NEXT FROM @getempid INTO @empid END CLOSE @getempid DEALLOCATE @getempid
I am getting the complete row displayed as output . How do i redirect the output to the declared output is my concern.
I want to truncate all tables present in the particular database, Is there any simple way to do it? or do I have to do it on individula basis (table by table)?