{"id":1900,"date":"2017-12-06T10:32:08","date_gmt":"2017-12-06T10:32:08","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1900"},"modified":"2020-01-09T09:42:34","modified_gmt":"2020-01-09T09:42:34","slug":"compile-sql-file-for-syntax-for-error","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/compile-sql-file-for-syntax-for-error\/","title":{"rendered":"Compile sql file for syntax for error"},"content":{"rendered":"<p><strong>saiki created the topic: Compile sql file for syntax for error<\/strong><br \/>\nHi,<\/p>\n<p>How to Compile sql file for syntax error using ANT script.<\/p>\n<p>Is there any possibility to compile through batch file.<\/p>\n<p>I have 100 of sql file i dont want to create db and know the error in file.<\/p>\n<p>Like java i want to compile it<\/p>\n<p><strong>rajeshkumar replied the topic: Re: Compile sql file for syntax for error<\/strong><br \/>\nOne way &#8211; exec method where you can mysqld and do whatever you want.<br \/>\n<a href=\"http:\/\/ant.apache.org\/manual\/Tasks\/exec.html\" target=\"_blank\" rel=\"noopener\">ant.apache.org\/manual\/Tasks\/exec.html<\/a> <\/p>\n<p>Another way<br \/>\n<a href=\"http:\/\/www.roseindia.net\/tutorials\/ant\/AntScriptCreateMysqlTable.shtml\" target=\"_blank\" rel=\"noopener\">www.roseindia.net\/tutorials\/ant\/AntScriptCreateMysqlTable.shtml <\/a><\/p>\n<p>Please try any of these and let me if you have any issues in script.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>saiki replied the topic: Re: Compile sql file for syntax for error<\/strong><br \/>\nCurrently we are creating database through ant script only from CI. We do this build for every 8hrs.<\/p>\n<p>Problem is b4 running the build we are deleting the existing database and then creating the new DB with same name. If there are any syntax error in the sql file the build fails and then it takes some time to fix it.<\/p>\n<p>Idea is to compile sql (Check for syntax error) file for every 3hrs rather than executing and creating new DB and data ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>saiki created the topic: Compile sql file for syntax for error Hi, How to Compile sql file for syntax error using ANT script. Is there any possibility to compile through&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[12],"tags":[421],"class_list":["post-1900","post","type-post","status-publish","format-standard","hentry","category-apache-ant","tag-sql"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=1900"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1900\/revisions"}],"predecessor-version":[{"id":1901,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1900\/revisions\/1901"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}