0

I have postgresql localhost database installed in to my machine and try to create table using round house tool, I'm getting the below error

RoundhousE encountered an error. 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)

command I have tried to execute:

"D:\Users\myusername\.dotnet\tools\rh.exe" rh.redgate.diff /d="TestRoundhousE" /f="D:\Users\myusername\Desktop\Round\roundhouse\db\PostgreSQL" /s="PostgreSQL 14" /vf="_BuildInfo.xml" /vx="//buildInfo/version" /r="https://github.com/chucknorris/roundhouse.git" /env=LOCAL /simple

rh.redgate.diff.bat file text

B@echo off
::"C:\Program Files (x86)\Red Gate\SQL Compare 8\sqlcompare.exe" /database1:"TestRoundhousE" /scripts2:"C:\code\RoundhousE\db\TestRoundhouse" /include:table /exclude:table:\[Version\]^|\[ScriptsRun\]^|\[ScriptsRunErrors\] /options:Default,IgnoreConstraintNames,IgnorePermissions /ignoreparsererrors /f /scriptfile:"C:\Users\robz\Desktop\Diff.sql"

SET DIR=%~d0%~p0%
SET DIR=C:\code\roundhouse\code_drop\sample\deployment\

SET database.name="TestRoundhousE"
SET sql.files.directory="D:\Users\username\Desktop\Round\roundhouse\db\PostgreSQL\TestRoundhousE"
SET server.database="localhost"
SET repository.path="https://github.com/chucknorris/roundhouse.git"
SET version.file="_BuildInfo.xml"
SET version.xpath="//buildInfo/version"
SET environment=LOCAL

"D:\Users\username\.dotnet\tools\rh.exe" rh.redgate.diff /d=%database.name% /f=%sql.files.directory% /s=%server.database% /vf=%version.file% /vx=%version.xpath% /r=%repository.path% /env=%environment% /simple

pause
  1. Do I need to use any username and password command here?. can you please suggest ?.

Note: I'm trying to use same sample scripts to create database - https://github.com/chucknorris/roundhouse/tree/master/db/PostgreSQL/TestRoundhousE

Error

shivu
  • 1
  • 1
  • "and that SQL Server is configured ", looks like your code tries to connect to a Microsoft SQL Server database, not a PostgreSQL instance. Please check – Frank Heikens Sep 08 '22 at 18:29
  • I'm trying to use same sample folder codes of the repo code without any changes. https://github.com/chucknorris/roundhouse/tree/master/db/PostgreSQL/TestRoundhousE. I'm not changing anything here. – shivu Sep 09 '22 at 04:43
  • Those are SQL files, your problem lies in the database connection: The application tries to connect to a SQL Server instance, not PostgreSQL. Is there any documentation about how to connect to a database? – Frank Heikens Sep 09 '22 at 05:41
  • In this github repo they have mentioned this tool can be used for postgresql also, but I'm not sure about how to create postgresql db . Can you please check the document again. if you can findout. https://github.com/chucknorris/roundhouse – shivu Sep 09 '22 at 06:44

0 Answers0