SQL Server Agent - Backup Steps
Apr 7, 2008Can anyone describe step by step how we specify a backup plan for our database? For example to backup our db and execute every night.
Thanks
Can anyone describe step by step how we specify a backup plan for our database? For example to backup our db and execute every night.
Thanks
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!
View 3 Replies View Related
I have a few reports. I want to run each report as one step of sql agent job. If the report succeeds only then the job should move to the next step ? is it possible
I am able to make separate jobs for separate reports but not as steps of one job.
Thanks in advance
This seems to happen just after our backups run. the result is that the SQL Server
Enterprise Manager can be brought up the next day but nothing can be accessed or
inquired of. The service is still running, the server is still up and rebooting the server
resolves the problem.
98/08/06 20:32:31.68 kernel dpdb_asyncread: mirror: Operating system error 6
(The handle is invalid.) encountered
Is anybody else using Arcserve Backup Agent for SQL Server for Windows NT, RAID 5?
Have you seen this? I`ve been to MS home page and on technet. No mention of this
problem. Next stop is Arcserve home page, if they have one. I have read the error logs
and this is the second time this has happened this week. Both times since we added
Arcserve to manage our MS SQL Server Database backups.
Best Regards and Thanks for your time.
I want to schedule a database backup using SQL Server Agent Jobs how can i do this?
View 1 Replies View RelatedHi,
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
Hi All,
I got SQL agent backup failed problem which took me 2 days , but still couldn't figure out, so tired. Help please!!!
2 days ago,the database was using my domain account to logon both SQL server and SQL agent, the backup jobs worked good. Since I changed db to another domain account which has same permission as mine at both SQL server box and database, but almost all jobs got failed except "check integrity", and the error is "The job failed. The Job was invoked by User rose. The last step to run was step 1 (Step 1).". I checked the log files and backup report, could't get any clues, and I switch domain account back to mines, it works good . But my boss required me using another domain account , what should I do? HELP!!!
We've been experiencing some problems on some of our databases ever since we've updated our servers to SP5. Backup exec seems to hang up after reaching a small number of bytes and then goes no further. I've installed the new MDACS drivers but it hasn't solved the problem.
Any ideas would be greatly apreciated!
Thank you,
i know this topic has been covered and i've searched but i can't find the answer.
-SQL server is a diffrent server than my backup server
-i've installed the sql agent option on the backup exec server
-i've installed the client network utility on the remote server
the backup server doesn't see the SQL server databases. any thoughts
could it be a security issue?
thanks!
when I run a package from a command window using dtexec, the job immediately says success.
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 3:37:41 PM
Finished: 3:37:43 PM
Elapsed: 2.719 seconds
However the Job is still in th agent and the status is executing. The implications of this are not good. Is this how the sql server agent job task is supposed to work by design.
Thanks,
Larry
please help me, i need to know if i need to purchase a sql agent for veritas backup exec. i am using the sql msde version only, not the full scale version. any help would be great.
View 4 Replies View Related
Hi,
If we were to assign permissions to a backup agent such as Backup Exec to backup the databases on the SQL server, what role would give the least amount but sufficient permissions to perform the backup? I know domain admin would make the agent a local admin and therefore allow it to back up the database but is there a role available to allow backup only?
Please note that I'm referring to a domain account used by Backup Exec to directly backup the databases rather than sql server agent.
Thanks.
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
Does anyone know why a backup database statement aborts a job in a stored procedure so that you can't handle the error with @@error, but when you run the same stored procedure in a query window the error handling does get run?
The snippet of code looks like this:
SET XACT_ABORT OFF
SET ANSI_NULLS OFF
set ansi_warnings off
set arithabort on
declare @backup_status int
declare @cmd varchar(1024)
SET NOCOUNT ON
print 'Options value: ' + convert(varchar, @@options)
set @backup_status = 0
if (@backup_mode = 'F')
begin
BACKUP DATABASE
@DB TO DISK = @BackupFile
with
NAME = @Name,
DESCRIPTION = @Description,
MEDIANAME = @MediaName,
MEDIADESCRIPTION = @Description,
STATS = 10,
init, nounload, noskip
if @@error != 0
begin
set @backup_status = 1
print '**************** Backup of ' + @DB + ' Failed'
end end
When this is run in a query window, the print statement at the bottom does get executed, but when run as a step in a sql agent job it does not.
Thanks.
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:
EXEC master..xp_cmdshell 'm: & cd C:Program Filesfoldername1 AutoGeneral_Ftp & dir & FTP -n -s:C:Progra~1foldername1AutoGeneral_FTPupload_G eneral.ibc www.someorgname.org & move /Y
\networkdriveArchiveGeneral*.pdf \networkdriveArchiveackupsGeneral'
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?
Thanks in advance,
Stedan
hi,
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,
thank you
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?
We just moved source server to newer, bigger box ... Windows 2003 and Active Directory ... Snapshot agent worked but distribution failed ... Same login as on older machine, login is sysadm, used DCOMCNFG to allow ability to launch process ... What are we missing?
View 4 Replies View Relatedhi friends,
Anyone give give me the steps we have to follow for debussing a stored procedure in sql server 2005...
Hi there,
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.
Thanks in advance
Gary
I just want the simple steps. I think this is linking through get external db? Is it different from SQL Server 2005?
Is this an Access question or a SQL server question.
thanks,
I need to know the steps on how to configure the SSRS Forms Authentication and its IIS Configuration. What specific Config Files should be modified?
i am using IIS 6.0, Windows Server 2003, SQL Server 2005.
Please help....
Hi
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?
Thanks
Doug
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.
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
SQL Server 2008 r2 - 6 GB memory...I attempted a backup on a 500GB database but it was taking way too long. I checked the resources on the box and saw the CPU at 100%. I checked the SQL Server activity log and saw a hung query (user was not even logged on) that had multiple threads so I killed it and now the CPU utilization is back to normal.
Trouble is, now all of the threads in the activity monitor for the backup show 'suspended' and the backup appears to be not doing anything.
Need to restore database,here's the scenario:
Data got deleted on Friday evening, need to have database restored to FRiday afternoon and also some data has been entered on Monday, which needs to be there.
Windows 2003 backup utility uses the shadow copy option that allows it to copy open files.
Therefore, can I use this utility to backup the .mdf and .ldf files for my SQL 2000 database?
I can then attach the .mdf files if I need to restore the database to another server.
Can anyone tell me if this is safe? I've tried it and it worked but I'm worried there maybe some lurking danger in using this approach.
I've written a custom script to delete backup files from location. But unable to modify now to count the number of files are deleted. How to modify the script...
/* Script to delete older than N days backup from a specific directory */
USE [db_admin]
GO
IF OBJECT_ID('usp_DeleteBackup', 'P') IS NOT NULL
DROP PROC usp_DeleteBackup
GO
[Code] .....
I have only one tape drive.
My server is using the SQL server 2005 backup tool and arcserve backup tool to backup different files .
Everytime I need to disable and enable the tape device driver (in device manager /windows) before I can use SQL server 2005 backup tool.
Everytime I need to disable and enable the tape device driver (in device manager /windows) before I can use arcserve backup tool.
It seems that the tape device resource is held by softwares even the tape drive is not in use.
What should I do to make the tape drive shared by different softwares?
Regards,
Manuel
Hi,
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?
Thanks in advance,
Darrin
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)?
Thanks.
I want to know how people are backup up their win2k system and SQL 2000 server. If you want a run backup once a night and first backup win2k file system and then run backup using sql agent will that work?
Thanks.