Tuesday, 12 June 2018

your client ip does not have access to the server. sign in to an azure error

I got the below error while access the Dynamics 365 PROD DB from my DEV box.

your client ip does not have access to the server. sign in to an azure error

Reason: Dev box IP was not whitelisted in the PROD instance.

Solution:

Below is the query to add the IP addresses to the firewall table(sys.database_firewall_rules) to access the database from outside.

Run the below query to see existing IP's
select * from sys.database_firewall_rules;


I executed the below queries to add the IP addresses to the table.

-- Create database-level firewall setting for only for one IP 0.0.0.4 EXECUTE sp_set_database_firewall_rule N'Example DB Setting 1', '0.0.0.4', '0.0.0.4'; -- Update database-level firewall setting to create a range of allowed IP addresses EXECUTE sp_set_database_firewall_rule N'Example DB Setting 1', '0.0.0.4', '0.0.0.6';

Use what is my ip in google for knowing your public IP.
Note: My AX is on cloud and we created a custom screen in AX to run the queries.

Below are the links helped me.
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-database-firewall-rule-azure-sql-database?view=azuresqldb-current
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure

No comments:

Post a Comment

Document type to keep attachments of ER configurations has not been defined in ER parameters dynamics 365 finance & Operations

I was getting the below error while generating electronic payment for vendor payments in d365 F&O with 8.0 version. Document type to ...