Bcp job scheduling sql server management studio
This presentation is the property of its rightful owner.
Sponsored Links
1 / 8

-BCP JOB SCHEDULING- SQL SERVER MANAGEMENT STUDIO PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on
  • Presentation posted in: General

-BCP JOB SCHEDULING- SQL SERVER MANAGEMENT STUDIO. -PRAJWAL -PRAMOD -KAVISH. CREATING NEW JOB. - Make sure that the SQL SERVER AGENT is started - Right click on jobs, select new job. Defining the Job .

Download Presentation

-BCP JOB SCHEDULING- SQL SERVER MANAGEMENT STUDIO

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Bcp job scheduling sql server management studio

-BCP JOB SCHEDULING-SQL SERVER MANAGEMENT STUDIO

-PRAJWAL

-PRAMOD

-KAVISH


Creating new job

CREATING NEW JOB

- Make sure that the

SQL SERVER AGENT is started

- Right click on jobs, select new job


Defining the job

Defining the Job

  • Give an appropriate name and description to the job


Creating the steps

Creating the steps

  • On Select a Page section,

    Click STEPS and click on the NEW button


Setting the job step properties

Setting the Job step properties

  • Select type as TRANSACT –SQL SCRIPT (T-SQL)

  • Type the steps in COMMAND


Bcp script using xp cmdshell command

BCP SCRIPT using xp_cmdshell (COMMAND)

exec sp_configure 'show advanced options',1

go

reconfigure

go

exec sp_configure 'xp_cmdshell',1

go

reconfigure

go

declare @command nvarchar(4000), @command1 nvarchar(4000), @command2 nvarchar(4000)

set @command=‘ bcp AdventureWorks.person.address out C:\backup\b.txt -c -S INFCH02817 -U kavish -P kavish'

set @command1='b cp AdventureWorks.HumanResources.EmployeeAddress out C:\backup\b1.txt -c -S INFCH02817 -U kavish -P kavish'

set @command2=‘ bcp AdventureWorks.HumanResources.Department out C:\backup\b2.txt -c -S INFCH02817 -U kavish -P kavish'

exec xp_cmdshell @command

exec xp_cmdshell @command1

exec xp_cmdshell @command2

go


Scheduling the job

SCHEDULING THE JOB

  • Specify the NAME and SCHEDULE TYPEand schedule the job as required


Thank you

THANK YOU


  • Login