sql: bcp eporting and xml importing
TRANSCRIPT
XML Exporting and Importing
Presentation by Aaron BumaDevelopment DBA
Exporting Using BCP
• BCP: Bulk Copy Program– Give a SQL statement, Get a file with results
• Access from Command Prompt/Powershell
• 1) BCP “Statement” queryout {file location} {username/password/Trusted} {Server}
Importing XML from a file
• Use OPENROWSET() to pull file into memory
• Use OPENXML to point to the file and shred
DEMO
Review• BCP data from database to file• OPENROWSET and OPENXML to pull XML out of file
Presentation Recording, Slides and Scripts– Available at:
http://www.aaronbuma.com/category/sql-training/– Contact:
Email: [email protected]