tag:help.appveyor.com,2012-11-13:/discussions/questions/354-use-other-sql-server-databasesAppVeyor: Discussion 2018-08-25T01:45:36Ztag:help.appveyor.com,2012-11-13:Comment/334498122014-06-18T14:07:07Z2014-06-18T14:07:08ZUse other SQL Server Databases<div><p>We are using this command at the moment. I think I just need to
tweak a few parameters to make it work:</p>
<pre>
<code>sqlcmd -U sa -P Password12! -Q "create database phinxtesting;GO;"
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: Could not open a connection to SQL Server [2]. .
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..</code>
</pre></div>Rob Morgantag:help.appveyor.com,2012-11-13:Comment/334498122014-06-18T17:29:20Z2014-06-18T17:29:20ZUse other SQL Server Databases<div><p>That's right you can drop and create any databases as you have
admin access on build worker.</p>
<p>@Rob I think you are missing SQL instance name in your script.
Also, make sure SQL Server service is enabled on Environment tab of
project settings.</p>
<p>More info: <a href=
"http://www.appveyor.com/docs/services-databases">http://www.appveyor.com/docs/services-databases</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/334498122014-06-19T09:47:20Z2014-06-19T09:47:22ZUse other SQL Server Databases<div><p>I am trying this now, still not working but I think we're almost
there!! Any tips?</p>
<pre>
<code>sqlcmd -S ".\SQL2008R2SP2" -U sa -P Password12! -Q "create database phinxtesting;"
8Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. .
9Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
10Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..</code>
</pre>
<p>Cheers,</p>
<p>Rob</p></div>Rob Morgantag:help.appveyor.com,2012-11-13:Comment/334498122014-06-19T17:33:49Z2014-06-19T17:33:49ZUse other SQL Server Databases<div><p>Make sure SQL Server service is enabled on Environment tab of
project settings (or in YML if you use it).</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/334498122014-06-20T09:42:04Z2014-06-20T09:42:04ZUse other SQL Server Databases<div><p>Ok Guys, I cracked it. The problem was the order or execution,
MSSQL hadn't started when I was trying to create the DB.</p></div>Rob Morgantag:help.appveyor.com,2012-11-13:Comment/334498122014-06-20T19:21:27Z2014-06-20T19:21:27ZUse other SQL Server Databases<div><p>Great, thanks for the update!</p>
<ul>
<li>Feodor</li>
</ul></div>Feodor Fitsner