简体   繁体   中英

Access to Azure Database

I have created an Access 2013 web app which creates an Azure SQL database behind the scenes on our O365 SharePoint web site. I can access this database using SSMS studio (I have the professional version not the express version).

I would like to link to the Azure database tables or be able to copy the database. The reason for this is that I cannot create views in the Azure database and the Access web app is too limited for our external reporting needs. We don't need to create views or tables in the Azure database we only need to access the information stored in its tables.

Whenever I try to right click on the Azure database to perform a task I receive the following error.

Cannot open server 'xxxxxxx' requested by the login. Client with IP address 'xxx.xxx.xxx.xxx' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=40615&LinkId=20476

The provided link is useless, it contains no information (There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time).

How do I take care of this error or how can I link to the Azure SQL database.

When viewing your database in the Azure management portal, there is an option on the right hand side that says Manage allowed IP addresses . That link will take you to a page where you can enter IP addresses that will be allowed through the firewall.

Here's a link to the MSDN article: How to: Configure Firewall Settings (Azure SQL Database)

Manage Server-Level Firewall Rules through Transact-SQL

  1. Launch a query window through the Management Portal or through SQL Server Management Studio.

  2. Verify you are connected to the master database

  3. Server-level firewall rules can be created, updated, or deleted from within the query window

    • To create or update server-level firewall rules, execute the sp_set_firewall rule stored procedure. The following example enables a range of IP addresses on the server Contoso.
   EXEC sp_set_firewall_rule @name = N'ContosoFirewallRule', @start_ip_address = '192.168.1.1', @end_ip_address = '192.168.1.10'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM