{"id":47807,"date":"2021-03-23T19:07:31","date_gmt":"2021-03-23T18:07:31","guid":{"rendered":""},"modified":"2021-03-23T19:07:31","modified_gmt":"2021-03-23T18:07:31","slug":"quickly-execute-a-folder-of-sql-scripts-against-a-sql-server","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/","title":{"rendered":"Quickly Execute a Folder of SQL Scripts against a SQL Server"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full webp-format\" src=\"https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader.jpg\" alt=\"An illustration representing a data warehouse, next to an illustration of Bit the Raccoon.\" width=\"1920\" height=\"700\" data-orig-srcset=\"https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader.jpg 1920w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-300x109.jpg 300w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-1024x373.jpg 1024w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-768x280.jpg 768w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-1536x560.jpg 1536w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-330x120.jpg 330w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-800x292.jpg 800w, https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader-400x146.jpg 400w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionheader.jpg\" \/><\/p>\n<p>Another week and another useful dbatools snippet for you today. Last week at work I was given a folder of 1,500 scripts \u2013 each containing a create table statement. Can you imagine having to open each file in Management Studio to be able to execute it? Thank goodness we have PowerShell and <a href=\"https:\/\/dbatools.io\/\" target=\"_blank\" rel=\"noopener\">dbatools<\/a> on our side.<\/p>\n<p>The code for this example is pretty short, but there are a couple of things to point out.<\/p>\n<p>First, I used\u00a0<code>Connect-DbaInstance<\/code> to create a server object to use to run the queries. This means that we\u2019re efficiently reusing the connection rather than opening a new one for each file we want to execute.<\/p>\n<p>Second, I\u2019m using the foreach method which takes each script file returned from the <code>Get-ChildItem<\/code>\u00a0call, and executes\u00a0<code>Invoke-DbaQuery<\/code>. With this we can use the <code>-File<\/code> parameter to pass in the SQL file and that\u2019s really all we need. This will loop through each file running the SQL scripts.<\/p>\n<pre><span style=\"color: #808000\">$SqlInstance<\/span> = <span style=\"color: #0000ff\">'mssql1'<\/span>\r\n<span style=\"color: #808000\">$destinationDatabase<\/span> = <span style=\"color: #0000ff\">'AdventureWorks2021'<\/span>\r\n<span style=\"color: #808000\">$folderPath<\/span> = <span style=\"color: #0000ff\">'.\\output\\AdventureWorks2017'<\/span>\r\n  \r\n<span style=\"color: #008000\"># Create a connection to the server that we will reuse - can use SqlCredential for alternative creds<\/span>\r\n<span style=\"color: #808000\">$sqlInst<\/span> = <span style=\"color: #ff00ff\">Connect-DbaInstance<\/span> <span style=\"color: #808080\">-SqlInstance<\/span> <span style=\"color: #808000\">$SqlInstance<\/span>\r\n  \r\n(<span style=\"color: #ff00ff\">Get-ChildItem<\/span> <span style=\"color: #808000\">$folderPath<\/span>).Foreach{\r\n    <span style=\"color: #ff00ff\">Invoke-DbaQuery<\/span> <span style=\"color: #808080\">-SqlInstance<\/span> <span style=\"color: #808000\">$sqlInst<\/span> <span style=\"color: #808080\">-Database<\/span> <span style=\"color: #808000\">$destinationDatabase<\/span> <span style=\"color: #008000\">-File<\/span> <span style=\"color: #808000\">$psitem<\/span>.FullName\r\n}<\/pre>\n<p>That\u2019s really all we need for this blog post, but in order to set this up for a demo I did use a few other dbatools commands. I\u2019ve posted the script above, along with the setup scripts on my <a href=\"https:\/\/github.com\/jpomfret\/demos\/blob\/master\/BlogExamples\/08_ExecuteFolderOfScripts.ps1\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>. This includes creating a new database, scripting out all the tables into individual script files, and ensuring all the schemas and other dependencies were ready in the new database.<\/p>\n<p>Thanks for reading, and hope this is a useful snippet. It sure saved me a lot of time this week.<\/p>\n<p class=\"x-hidden-focus\" style=\"text-align: center\">-=-<\/p>\n<p><em>Jess is a Database Engineer with a passion for automation, proper football and fitness. You can follow her <a href=\"https:\/\/twitter.com\/jpomfret\" target=\"_blank\" rel=\"noopener\">on Twitter<\/a>\u00a0and via\u00a0<a href=\"https:\/\/jesspomfret.com\/\" target=\"_blank\" rel=\"noopener\">her personal blog<\/a>.<\/em><\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"x-hidden-focus\">Learn more<\/h2>\n<ul>\n<li><a href=\"https:\/\/jesspomfret.com\/psdefaultparametervaluescontainers\/\" target=\"_blank\" rel=\"noopener\">Using PSDefaultParameterValues for connecting to SQL Server in containers<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-gb\/learn\/modules\/azure-sql-intro?ocid=AID3020565\" target=\"_blank\" rel=\"noopener\">Introduction to Azure SQL<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-gb\/learn\/paths\/azure-sql-fundamentals?ocid=AID3020565\" target=\"_blank\" rel=\"noopener\">Azure SQL fundamentals<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-gb\/learn\/modules\/secure-your-azure-sql-database?ocid=AID3020565\" target=\"_blank\" rel=\"noopener\">Secure your Azure SQL Database<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Last week at work I was given a folder of 1,500 scripts \u2013 each containing a create table statement.<\/p>\n","protected":false},"author":430,"featured_media":36918,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"categories":[594],"post_tag":[519],"content-type":[],"coauthors":[1673],"class_list":["post-47807","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technetuk","tag-technet-uk"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom<\/title>\n<meta name=\"description\" content=\"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom\" \/>\n<meta property=\"og:description\" content=\"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Industry Blogs - United Kingdom\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-23T18:07:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jess Pomfret\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jess Pomfret\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/author\/jess-pomfret\/\",\"@type\":\"Person\",\"@name\":\"Jess Pomfret\"}],\"headline\":\"Quickly Execute a Folder of SQL Scripts against a SQL Server\",\"datePublished\":\"2021-03-23T18:07:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\"},\"wordCount\":309,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg\",\"keywords\":[\"TechNet UK\"],\"articleSection\":[\"TechNet UK\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\",\"name\":\"Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg\",\"datePublished\":\"2021-03-23T18:07:31+00:00\",\"description\":\"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg\",\"width\":800,\"height\":450,\"caption\":\"An illustration representing a data warehouse, next to an illustration of Bit the Raccoon.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quickly Execute a Folder of SQL Scripts against a SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\",\"name\":\"Microsoft Industry Blogs - United Kingdom\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\",\"name\":\"Microsoft Industry Blogs - United Kingdom\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft Industry Blogs - United Kingdom\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom","description":"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/","og_locale":"en_US","og_type":"article","og_title":"Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom","og_description":"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?","og_url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/","og_site_name":"Microsoft Industry Blogs - United Kingdom","article_published_time":"2021-03-23T18:07:31+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg","type":"image\/jpeg"}],"author":"Jess Pomfret","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jess Pomfret","Est. reading time":"1 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/author\/jess-pomfret\/","@type":"Person","@name":"Jess Pomfret"}],"headline":"Quickly Execute a Folder of SQL Scripts against a SQL Server","datePublished":"2021-03-23T18:07:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/"},"wordCount":309,"commentCount":0,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg","keywords":["TechNet UK"],"articleSection":["TechNet UK"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/","name":"Quickly Execute a Folder of SQL Scripts against a SQL Server - Microsoft Industry Blogs - United Kingdom","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg","datePublished":"2021-03-23T18:07:31+00:00","description":"Last week at work I was given a folder of 1,500 scripts \u2013 can you imagine having to open each file in Management Studio to be able to execute it?","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#primaryimage","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg","contentUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/01\/datasolutionthumb.jpg","width":800,"height":450,"caption":"An illustration representing a data warehouse, next to an illustration of Bit the Raccoon."},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/technetuk\/2021\/03\/23\/quickly-execute-a-folder-of-sql-scripts-against-a-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/"},{"@type":"ListItem","position":2,"name":"Quickly Execute a Folder of SQL Scripts against a SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/","name":"Microsoft Industry Blogs - United Kingdom","description":"","publisher":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization","name":"Microsoft Industry Blogs - United Kingdom","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft Industry Blogs - United Kingdom"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts\/47807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/users\/430"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/comments?post=47807"}],"version-history":[{"count":0,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts\/47807\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/media\/36918"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/media?parent=47807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/categories?post=47807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/post_tag?post=47807"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/content-type?post=47807"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/coauthors?post=47807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}