question

CappellettiAlen-4296 avatar image
0 Votes"
CappellettiAlen-4296 asked Yufeishao-msft commented

DAC to sql server 2019

Hi,
I try to connect for test to a sql production instance with SQLSERVER 2019.
It's updated with last CU... and SQL Browser is disabled (it's a default instance).

This test is successful with all my other instance on SQL SERVER 2017.
I also checked the "Allow remote connection to this server" from SQL connection properties... it's checked

This is the error:
"
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: SQL Network Interfaces, error: 25 - Connection string is not valid) (Microsoft SQL Server, Error: 87)
"

I tried with Command Prompt... but I don't see UDP?

 netstat -aon | findstr 1434
   TCP    0.0.0.0:1434           0.0.0.0:0              LISTENING       4084
   TCP    [::]:1434              [::]:0                 LISTENING       4084

Also see 2 firewall roles... for Inbound only...

![205515-image.png][1]

Every advise is welcome.
Thanks Alen.
[1]: /answers/storage/attachments/205515-image.png

sql-server-general
image.png (33.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

if you have resolved your error, please share your solution to other community member and mark as accepted,
so that your action would be helpful to them, if they encounter the same issue and read this thread
Thank you for understanding!

0 Votes 0 ·

1 Answer

TomPhillips-1744 avatar image
1 Vote"
TomPhillips-1744 answered acappelletti commented

The error "Connection string is not valid" is a problem with your connection string, not an error from SQL Server itself.

What exactly did you enter into the connection string?

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ops... naturally I'm using SSMS with the syntax for DAC connection.
First, I opened a new query tab and change connection on this.

After I inserted: "ADMIN:myserver" and a user/psw

I used the same approach to access to the other servers.
ALEN

0 Votes 0 ·

As a default, you cannot connect remotely.

Did you run and restart the server?

 sp_configure 'remote admin connections', 1;  
 GO  
 RECONFIGURE;  
 GO
1 Vote 1 ·

No restart but the t-sql statement I did it...

0 Votes 0 ·

Resolved...
I created an error into FIREWALL rule...

 New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol TCP -Action Allow

before was

 New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow

I used this exe

 .\PortQry.exe -n MYSERVER -p both -o 1433,1434

 querying...
    
 TCP port 1433 (ms-sql-s service): LISTENING
    
 UDP port 1433 (ms-sql-s service): LISTENING or FILTERED
    
 TCP port 1434 (ms-sql-m service): LISTENING
    
 UDP port 1434 (ms-sql-m service): LISTENING or FILTERED


ALEN





0 Votes 0 ·