?
Solved

How to work with SQL Job?

Posted on 2012-09-04
11
Medium Priority
?
523 Views
Last Modified: 2012-09-05
Hi Experts,

  I would like to know how to create jobs in sql and how to run time at scheduled time recursively? Please do explain with example. Thanks.
0
Comment
Question by:Easwaran Paramasivam
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38366679
you mean, in sql server agents folder?
I mean, what exactly is the problem?
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38366685
I would like to create a backup script. I would like to run on every Monday morning 10 am using sql server jobs. How to achieve that?
0
 
LVL 6

Expert Comment

by:Manuel Marienne-Duchêne
ID: 38366752
Create a script sql and save it to a file with .sql
Execute it with task planified an sql agent :
script.slq :
UPDATE config 
	SET [valeur] = CONVERT(VARCHAR(24),GETDATE(),103) 
WHERE param = 'stat_vrp_date_derniere_modification'

Open in new window


run.vbs

sqlcmd -S server ip\SQLEXPRESS -U user -P password -i "d:\script.sql" , 1,true

Open in new window

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38366775
manumd,
  I don't see how that can do what is requested here, so I presume it was intended for another question?


EaswaranP:
  to create a backup script, you create a maintenance plan, where you can configure all you need with the sql server's gui. you could also implement this from command line, but the maintenance plan's options are very suitable to do this without the hassle of doing it via command line.
0
 
LVL 9

Expert Comment

by:keyu
ID: 38366777
If you want to do it manually with step by step you can do it using below screens in given link.....

http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx

if you want to add it using sql script you can perform it using below link..

http://msdn.microsoft.com/en-us/library/ms187910.aspx
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38366778
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38366783
Execute it with task planified an sql agent - How to achieve this? Please do explain the steps. Thanks.
0
 
LVL 9

Accepted Solution

by:
keyu earned 1600 total points
ID: 38366818
0
 
LVL 6

Expert Comment

by:Manuel Marienne-Duchêne
ID: 38366847
It's an a example banane
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 38367486
Thanks.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article, we will show how to detach and attach a database and then show how to repair a corrupt database and attach it, If it has some errors. We will show how to detach and attach using SSMS or using T-SQL sentences.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month7 days, 4 hours left to enroll

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question