Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeamCity error : roundhouse.databases.sqlserver.SqlServerDatabase with provider System.Data.SqlClient does not provide a facility for creating a database at this time. #387

Closed
jgrandydev opened this issue Oct 1, 2019 · 5 comments

Comments

@jgrandydev
Copy link

jgrandydev commented Oct 1, 2019

.NET Core 2.2.0

No problems running locally. However in TeamCity when run postBuild.cmd receive error :

[14:03:38]
[Step 2/11] Creating MY_DATABASE database on localhost server if it doesn't exist.
[14:03:52]
[Step 2/11] roundhouse.databases.sqlserver.SqlServerDatabase with provider System.Data.SqlClient does not provide a facility for creating a database at this time.

TeamCity Build Agent Service Account has been permissioned SA on the target SQL Server.

@erikbra
Copy link
Member

erikbra commented Oct 13, 2019

Are you running against SQL Azure, by any chance? I don't think RoundhousE can create a database in SQL Azure automatically (I'm not sure why, haven't looked into it).

@jgrandydev
Copy link
Author

No this is not SQL Azure. This is SQL Server 2012 and SQL Server 2016 installed on standalone servers.

@jgrandydev
Copy link
Author

Now I am seeing this same error in my local builds.
Apparently RoundhousE is unable to create database if it does not exist.
What are some possible reasons ?

  Creating MyDatabase database on localhost server if it doesn't exist.
1>  roundhouse.databases.sqlserver.SqlServerDatabase with provider System.Data.SqlClient does not provide a facility for creating a database at this time.
1>  System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
1> 

@chakalakonda
Copy link

Is the SQL Server instance running?
Is the Named Pipes Protocol enabled in the SQL Server configuration?

@erikbra
Copy link
Member

erikbra commented Apr 13, 2020

This looks like an error with your local environment, check that the connection string is correct. Re the error message:

System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

@erikbra erikbra closed this as completed Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants