1 / 8

-BCP JOB SCHEDULING- SQL SERVER MANAGEMENT STUDIO

-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 .

dalila
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. -BCP JOB SCHEDULING-SQL SERVER MANAGEMENT STUDIO -PRAJWAL -PRAMOD -KAVISH

  2. CREATING NEW JOB - Make sure that the SQL SERVER AGENT is started - Right click on jobs, select new job

  3. Defining the Job • Give an appropriate name and description to the job

  4. Creating the steps • On Select a Page section, Click STEPS and click on the NEW button

  5. Setting the Job step properties • Select type as TRANSACT –SQL SCRIPT (T-SQL) • Type the steps in COMMAND

  6. 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

  7. SCHEDULING THE JOB • Specify the NAME and SCHEDULE TYPEand schedule the job as required

  8. THANK YOU

More Related