I have a problem with a SQL Server (2000) Agent Job that has 3 steps that don't produce the desired outcome when invoked in total but will produce the desired outcome if the first step is broken up from the last two steps.
1) The first step uses third party software to generate PDFs to a folder.
2) The second step executes the following command to ftp the PDFs to a folder and move these PDFs to a backup folder:
3) The third step determines if any files remain in the folder that contained the PDFs. If files are still in the folder then the FTP and move step (step 2) did not work and a stored procedure is invoked to send an email to the appropriate administrator
DECLARE @result int
EXEC @result = master..xp_cmdshell 'Dir "\networkdriveArchiveGeneral*.pdf" | find /i "file"'
IF @result = 0
exec ibc_sp_Email_Report_Failure 'FTP General Report'
When I invoke this job from Enterprise Manager and view the job history, it says that all steps executed successfully (which I understand may be the case even if the files were not FTPed or moved since the command can still return a code indicating success even though it didn't do what I expected.) In fact, the PDF is generated and written to \networkdriveArchiveGeneral
eportname.pdf. Steps 2 and 3 do not do what I expect. The PDFs still remain in the folder.
But when I start the job from step 2, the files are then moved. So, invoking the entire job does not move the files; invoking the job from step 2 moves the files.
Simple, you think, it is obvious that you didn't set up your job steps correctly in that step 1 does not go to the next step upon success. But I already checked that. Step 1 goes to the next step upon success.
Anybody ever come upon this problem? Any suggestions as to what else I can look at?
Hi ALl I need a quick solution for my sql server problem as follows.
Actually Earlier we have SQL Server 7, Every 3 hours we execute one Procedure it takes only 15 seconds. Now we Install SQL Server 2000 and Same Procedure Is taking 30 Minutes for execution what could be the reason I want to minimize the execution time. how can i ?
I used to create DTS Package in SQL Server 2000 and some times schedule accordingly , but in SQL 2005 although there is a provision to buid the same through integration service but couldnt able to succeed.
( the goal is to transfer the data from one table to another in different database)
Is there any document or any one can provide the steps involved in developing DTS Package in SQL 2005
I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query window
Please see the image through this url http://kyxao.net/127/ExecutionProblem.png
Hi,I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query windowPlease see the image attached http://kyxao.net/127/ExecutionProblem.png Any ideas for this issue?Thanks a lot Jalijack
Hi, I have two job J1 and J2, each one has 10 steps. Now I want J2 to be the 11th step of J1 and I did not want manually type all the steps of J2 to be 11-20 step of J2. Is there an easy way through TSQL to do this ? sp_add_jobstep only works when the step is OS command or a script but not a job
I have to build a simple Windows Forms application that imports data for review and then exports it into a different format. I've created DTS packages in SQL 2000 for the import and the export.
What is the recommended way to execute the packages using buttons on a Windows form?
Hello, Thanks for reviewing my question. I am trying to install SQL Server 2005 but I keep running into the same error: SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET Framework, and then run SQL Server Setup again. The only documentation I find on this is configuring the issolation mode in IIS 6.0. Any help on is will be appreciated. Peter
what are the steps to create a linked server, I have tried unsuccesfully: The scenario is the following: From server A I want to be able to execute a select statement to a table in server B like select * from [server B].myRemoteDb.dbo.myremTable
I am administrator of server A but not of server B. I tried the
sp_addlinkedserver syntax but have not been succesful, so I would be grateful if somebody could just list the steps necessary to link Server B from Server A,
Hello,I have a SQL Server Agent job that has two steps. The job fails when I run it normally, with both steps. However, when I tried to troubleshoot, I ran each step individually, and both succeeded without errors. The first step runs an SSIS package under a proxy. The second is a T-SQL statement that simply runs a stored procedure. (There is no option for "Run As" for the T-SQL statement.) Again, each step runs fine when I run it under SQL Server Agent; also, the SSIS package runs fine when I run it from the file system, and the T-SQL statement completes successfully when I run it as a query.Does anyone have an idea why this is happening? Thanks!
We have several jobs that if any step fails, we need to continue with the next step. Due to this we have the both 'On Success Action' and 'On Failure Action' set to 'Go to the next step'. Our only issue is that when all the steps are done we still require the job itself to fail.
So my question is this, is there anyway the status of a job can be queried to determine if any of it's steps failed?
I am doing a project on web usage mining of my universities server logs and im just wondering how i go about mining them in sql server 2005?
Do i mine them in one table? do i normalise the web log data? what algorithms will i use on them as im trying to get usage patterns from the users and also where most of the users come from.
I have just take my system back to the factory defaults after some unsuccessful attempts to install 64 bit and 32 bit sql server on my notebook. I am looking to use either 32 or 64 bit (I have disks for both) and I would like to get a step by step guide that will help me through the process.
I tried an install of the 64 bit version, applied SP2, and it went smoothly but the report services browser didn't work. I tried to change some IIS settings but I didnt document what I changed so i was unable to undo the changes that i made when these didnt work.
I tried several combinations of things but then decided that a clean install on a clean system was the best option.
I need the SQL engine , reporting services, analysis services - and possibly integration services - i am not sure if i need notification services (dont know what it does anyway!)
I also have vs2005 - should i install that first or after sql server 2005 SP2?
Steps to install SSX (& Reporting Serivces) on 64 bit Windows Vista Ultimate
I struggled quite a bit over the past few days to complete this install. The sequence of steps is less obvious than those for Windows XP Pro on a 32 bit machine.
I recorded all the steps in one place in cookbook style for non-technical (but database capable) users like myself. I have referenced appropriate other postings and sources for detail steps. These are steps I found useful, you may be in a different situation.
My environment is as follows: -New HP dv9000 w/ 2GHz and 2GB memory -Factory installed Windows Vista Ultimate. Note this includes .NET Framework 2.0 so I did not have to deal with installing that. -I have no extant databases or SQL Server that I am trying to convert or upgrade!
Setup Steps Before Install: 1) Turn off User Account Control. At present, I am a one-user operation with close control over my system and there seemed to be issues with getting reporting services set up right with UAC. I may come back and modify this step later on and certainly would change this for any releasable systems.
1a)Go to Control Panel Home --> User Accounts --> Turn User Account Control on or off. 1b)Unselect Use User Acount Control. 2)Set up your IIS 7.0 for Reporting Services. IIS 7.0 has IIS 6.0 Compatibility features turned off out of the box. You will turn them on with this step. This is needed for both Reporting services and to enable the Adminscripts that are used in Step 3 below.
2a) Use the Control Panel --> Programs --> Turn Windows features on and off function. This is quite nicely desribed with screen shots at: http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=957 These steps worked for me although they are labeled Vista Beta 2.
3)Set up your 64 bit machine to run 32 bit ASP.NET This capability is needed to make sure you pass the System Configuration Check for Reporting Services. I don't know the full implications of this step and wonder if it might eventually bite me if I have to flip-flop between 32 and 64 bit ASP.NET or have them both run at the same time.
3a) Open a command line window by: Start --> Accessories -- Cmd Prompt 3b) In this window type: cscript %SystemDrive%inetpubAdminScriptsadsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
At some point, you may wish to go back to 64 bit. For that, see the posting by MihaelaE as an Answer in the SQL Server Reporting Services Forum under a thread started by fagster on 3/8/2007.
Now to actually install SQL Server.
1) Download the 64 bit SSX. This step fooled me for a while as the 64-bit downloads are 'below the fold' on the web page.
1a) Go to the SSX download page: http://msdn.microsoft.com/vstudio/express/sql/download/
1b) Scroll down the page and below Step 5, Register, you will see this text which takes you to the download you want: "* For the 64-bit install of SQL Server 2005 Express Edition, click here." 1c) Follow the "click here" to get the download.
2) Install the package from step 1c and you will get SQL Server Express.
2a) The install may fail and complain about not finding a valid SQL Server Native Client Install, sqlncli_x64.msi. You will have to extract the files manually and then run the sqlncli_64.msi package by itself. Then you can go back to step 2 and should be successful. To do this, see post of Mike Wachal on 4/5/2007 to SQL Server Express Forum, titled "Cannot Install SQL Server Express on Vista Ultimate -- cannot find MS SQL Server Native Client".
3) Now add in the SQL Server Management Studio Express 64 bit version.
3a) Go to the SSX download page: http://msdn.microsoft.com/vstudio/express/sql/download/
3b) Scroll down the page and below Step 5, Register you will see this text which takes you to the download you want: "* For the 64-bit install of SQL Server 2005 Management Studio Express, click here."
3c) Follow the "click here" to get the download.
4) Now add the SQL Server Reporting Services.
4a) Go to the SSX download page: http://msdn.microsoft.com/vstudio/express/sql/download/
4b) Scroll to Step 3 Download and Install (in the middle of the page) and download SQL Server Express Edition with Advanced Services SP2. 4c) Install, but at the Feature Selection screen, disable all components EXCEPT Reporting Services. You already have the other components installed. 4d) In the install, you will get a screen called "Report Server Installation Options". Go ahead and select the "Install but do not configure the server" radio button.
5) Go ahead and configure SQL Server Reporting Services. I'm not highly skilled in this area so I recommend the SQL Server Express Video "Learning Video 10: Getting Started with Reporting Services". This is found at: http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx I found this video to be cogent and useful.
That's what it took me to get SQL Server Express installed with reporting services on a 64 bit Vista Ultimate system. Sorry if this is so long but I wanted to cover all the steps that hung me up.
To forum moderators: If I have any errors that will lead people astray, I'm more than happy to correct them.
This posting is "AS IS" with no warrantees and caveat emptor.
Hi all,I am facing an unusual issue here. I have a stored procedure, that return different set of result when I execute it from .NET component compare to when I execute it from SQL Management Studio. But as soon as I recompile the stored procedure, both will return the same results.This started to really annoying me, any thoughts or solution? Thanks very much guys
Hello, Thanks for reviewing my question. I have installed VisualStudio 2005 on a computer and would like to know if I can install SQL 2005 Server and replace the SQL Express version? Will VS recognize it? Many Thanks to the Experts Peter
I'm using SQL Server 7.0. I have a job which runs DTS packages (1 package per step). When a task fails within my DTS package, I'd like an error returned for that step in the job thus stopping the job and not starting up the next step (DTS package) in the job. As it stands right now, if a task fails within the DTS package, that step in the job still returns a successful completion. Has anyone seen this before and is there something I can do to get the DTS to send a failure for that step in the job?
I am going to be moving multiple databases to a new server. Everything should go smooth, but I need to change a lot of the DTS packages that reference the old servername and replace it with the databases DNS record.
Is there an easy way to get a list of which dts reference the old server explicitly (not using database DNS)?
hi !!!i try to connect to my sql server local instance but it is always failed ..... can you please tell me the step by steps and options to use to install sql server on my machine and i think i need to use he personal copy rather than the standard as it will be on my machne not in the server??? please help
Can anybody tell me how many steps it's possible to put in one job. The reason I ask is that we have a job that has over 500 steps (import data from Excel file into SQl table) and every time it runs we have different steps failures.
Does fact, that excel file was dropped and recreated, change DTS Id ?
Hi, I am new to replication. I have to replicate a db on SQL7.0 sp5 . It's going to be transactionol. Is there any article which explains everything - where to start from and where to end? I mean everything step by step..... TIA.
Here is an interesting problem I can't figure out. I have a job with 6 steps as follows:
Step 1 - Import text file 1 Step 2 - Import text file 2 Step 3 - Delete all data from address tables 1 and 2 Step 4 - Copy data from imported table 1 to address table 1 Step 5 - Copy data from imported table 2 to address table 2 Step 6 - Delete imported taxt file table 1 and 2
Now when I run each of these steps individually, like running the dts packages and stored procedures my self it all works fine and the data in my tables appears to update. Then, when I set the job to run automatically, it says completed and no errors but my data hasn't updated. The job must be doing what it is meant to as it took about 40 seconds which is normal.
Hello, SQL Server 2005 Enterprise and new hardware have been ordered for our department. We currently run SQL Server 2000 (sp4). We have almost 500 DTS packages, 293 Jobs, and 14 user databases with hundreds of objects within.
Is there any documentation out there on how to scrutenize a current system? I have searched, and most of what I can find addresses migration planning with the assumption that the databases, packages, jobs, security, etc are ready to move over. We have a lot to think about before we can do that. We know we have redundancy problems (like View proliferation), table schema issues, obsolete DTS packages and Jobs, and otherwise a host of opportunities to 'clean house' and/or improve. We would really like to get a handle on what we are migrating before we migrate.
If you have any ideas or resources to you feel would be worth looking at, please share.
Generally speaking when you want to optimise an application that relies on a database which is the order of the following optimization techniques
a) optimizing the spread of the pysichal elements of the database on different disks of the server b) optimizing the use ot the RAM c) optimizing the SQL d) opimizing the OS
I've created SQL Server Agent jobs through management studio on SQL Server 2005. I can view and edit these jobs when I am logged into the server via remote desktop, but when trying to administer these jobs through Management Studio on a different machine, the steps do not appear in the job properties window. Anybody else see this behavior? Know why it occurs? Is it a bug, or another wonderful "feature" of Manglement Studio?