Can't login to SQL Azure Management - windows

Actually i have following step by step from http://www.windowsazure.com/en-us/manage/services/sql-databases/getting-started-w-sql-databases/ to create database and etc.
But when i try to login using username and password which i have configured,message error appear " Failed to retrieve connection information. Try to login again. "
I have configure firewall before to allowed my public ip to access the database.
How to solve my problem ?
Thanks

Clear your cookies and browsing history and contact Microsoft support if this persists after some time (like an hour)

That is very interesting problem.
What about checking connection with Microsoft SQL Server (can be Express edition).
If you configured firewalls then you should be able to access Azure database via Microsoft SQL Server Management Studio from your system with no problems.
Alternatively you could check Visual Studio. But I am not sure if Visual Studio Express edition can connect to Azure databases (you might need some paid version).
If you still have some connectivity issue using SQL Management Studio then that would indicate some networking problems between your place and Azure data centre. In that case I would recommend spinning up another Azure database (for very short time) in different data centre, set up firewalls and see if that will work.
EDIT
Any way to configure Firewall for Azure ?
Firewall to database cannot be configured at a level of individual databases; it needs to be configured at a level of server.
In Windows Azure Management portal, go to Database tab and then select database server:
Once you in server dashboard, select configuration top tab. You can change DB Server firewall allowed IP addresses under Allowed IP Addresses
In the same section there is Current Client IP Address which tell you the current IP. That very handy when you work with VPN or change your network quite often.

Allow popups. Chrome was blocking this from me.

Related

How can I run my project on client pc without installing SQL server on client pc

I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.

Cannot connect to AWS EC2 from visual studio (or anywhere actually)

I have an AWS server (MS SQL SERVER EXPRESS 2008 R2 with IIS), with an elastic IP of 54.214.8.111, security groups configured with HTTP, MS SQL and FTP, and I can connect to the remote virtual machine using the rdp file that amazon gives you in the console.
However when I try to connect via visual studio to test if the database is working, it gives me a "Login failed for user 'dbuser' error. I have a user called dbuser on my SQL Server (on the server side of course) with full access permissions etc. I also cannot connect to an ftp on the server, despite all guides and help doc. Something seems to be simply blocking my connection. I have tried the same thing on multiple computers.
Everything seems to be configured correctly except I suspect the server instance.
Can anyone help? PS I'm fairly new to web development, this is my first AWS EC2 server.
[UPDATE] I just tried to create a new instance in a different location, same error, maybe I don't know how to configure the SQL Server on the EC2?
I recently had the same connectivity issue to AWS/SQL Server, I finally have it resolved.
Connecting to SQL Server remotely on AWS involves 3 main factors:
AWS --> Windows Security --> SQL Server Settings/Security.
Connections can easily fail because each area has specific requirements. I'll go through the check-list:
AWS:
In AWS management console, go to Security Groups, click on the group that applies to your windows server, make sure MS SQL TCP port 1433 is open to your specific client IP. If not, you'll need to add it.
*UPDATE 5/10/22: In the inbound-security in AWS, if you enter 0.0.0.0 for source IP it will open that port publicly, you should not open the port to everyone. Only open this port to specific IP addresses and take additional security measures to protect it, allowing only authenticated users to access. Read up on security and how to configure to protect your SQL server.
Note the Public IP of your server
WINDOWS:
RDP to the Amazon Windows server, Start > Administrative Tools > Local Security Policy
Click Windows Firewall with Advanced Security, Windows Firewall Properties, Click the "Public Profile" tab, set Firewall State to "ON", Inbound to Block, Outbound to Allow (or block depending on your application). OK.
Expand the Windows Firewall (on the left Pane), R-Click the Inbound Rule, Click New Rule.
Click Port option, Next > , for TCP, enter 1433 Next >, Allow the connection, Next >, Next > , give it a name (SQL-PORT-ACCESS)
SQL-SERVER:
Login to SQL Server with SSMS (SQL Server Management Studio) using the default windows authentication.
On the left-pane, R-click the top server listing (with the database icon, the very first listing), and select "Properties"
Properties window, click Security on the left pane, choose the "SQL Server and Windows Auth"
Click Connections, check the "Allow Remote Connections" option ... Click OK.
Open the SQL Configuration Manager, Start > Programs > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager
SQL Server Network Configuration (Expand), select Protocols for MSSQL, R-Click TCP , select Properties (TCP should be enabled)
Click IP Addresses tab, check that IP1 is enabled, Dynamic Ports is 0, TCP port is 1433
Scroll all the way down to IPAll section, Enter 0 in TCP Dynamic Ports, and 1433 in TCP Port. OK...
Back on the left pane, click, SQL Server Services, R-Click the SQL Server option, and select "Restart".
(NOTE: SQL Browser server does not impact connectivity, browser service only lists available servers, with your specific connection parms, no need to start or worry about the browser)
TESTING:
You don't have go to your remote client to test, start by trying to connect from the same SSMS window on the server. This reduces all the other things that can go wrong at first, if you can connect here, you have some confirmation that it works. If it doesn't work from your own server, the issues are related to Windows security and SQL security and setup.
Under the Object Explorer (SQL server Management Studio), click "Connect" > Database Engine...
In the Server name:, enter your PUBLIC IP, a comma, then 1433. Example, if your public IP is 54.4.4.4 , enter 54.4.4.4,1433,
Select the authentication as "SQL Server", enter the login user and password.
If you're using "sa", remember to change the password.
If your connection works locally, then you can try your remote client connection.
At this point you know your SQL server and user settings are correct.
Next, try using SSMS on another computer. If that fails, probably the firewall needs a 2nd look...
Good place to understand issues, is the SQL logs easily accessible from SSMS, on the left pane, expand Management, then SQL Server Logs, current log will list any problems.
So, those are all the parts involved -- miss one and you'll be frustrated, but start by reducing the pieces when testing.
I was able to connect to my database on AWS Windows Server/SQL Express from a Windows device...
Good Luck!

How to connect TFS through Internet

I am working on a large application in team environment. We use to Team Foundation Server to control source code with VS2010.We are using LAN to connect TFS which works great in an small office but now we need to connect TFS through Internet.
What actually I want to know that we have many developers they reside in different location worldwide. We want to download there work directly in the TFS server through Internet like LAN. We will have also connect LAN users who work on this application and want to connect both kind of users parallel.
Note: WE DON'T WANT TO USE VPN.
Is there any possibility to do this kind of work in TFS? Any Help will be appreciated.
You can definately expose TFS over the internet. TFS is basically a set of web services hosted in IIS, just make your server internet-visible and you're set.
There are some security best practices you probably want to consider though:
1) You should configure an SSL cert in IIS and connect to TFS using HTTPS (an option when connecting in VS).
2) You should place your SQL Server database on a separate machine that is not directly exposed to the internet (but is visible to the Application Tier server). SSRS should reside on the AT server, the DB and SSAS should be on the Data Tier server.

How to access VS 2010 TFS over the internet from remote office

We have a team member in a different country, and are trying to figure out the most viable option to provide them with access to our Team Foundation Server for Visual Studio 2010.
You can check this http://msdn.microsoft.com/en-us/library/bb668967.aspx
If they are part of your corporate LAN/WAN, they should be able to get access just like a local user. If they are external, you have a couple choices:
VPN: You could give them VPN access into your network, then they could access like a local user.
Expose: You could expose TFS to the outside world by allowing the appropriate ports through your firewall.
You can also take a look at the TFS Proxy, but honestly I haven't done anything with that yet.
Open up port 8080 and route that port to the appropriate server. You can also setup to use HTTPS.
When the remote user is not on the same domain, he gets prompted for the credentials. The remote user can use the Windows Credential Cache (Stored Usernames and passwords for Windows XP).
Best solution is to enable TFS through a VPN for WAN users. Through port mapping you can enable TFS application tier access, but the Sharepoint (Documents) and Reports may not work properly. So, the best method is to enable VPS with SSL, and let internet users connect to your TFS just like internal users
Best of luck!

Connecting to database on web host in Visual Studio or Sql Server Management Studio

I have a web site developed locally with a local Sql Server database. I also have a web host that provides one Sql Server database for my site. Now I want to deploy the application, and I would like to be able to manage the remote database from the Server Explorer in Visual Studio. I have the connection string used in the application, which works fine for adding, say, a datasource to a control etc. But I don't know if there's any way to use it to connect the database inside the Server Explorer so that I can add tables etc. I have read that you're supposed to be able to this instead of using the Sql Server Management Studio, but I have'nt read anything about how to connect to the remote database in it.
What I have tried so far is this: I have selected Add database in Server Explorer. This brings up first a dialog where I choose Sql Server. And then I get a dialog where I can set Server name (which I tried using the ip address in the connection string below), and Authentication (where I chose Sql Server Authentication, with the user id and password from below). But when I test the connection it fails.
Here's the connection string, which works fine when used for datasources in the application (obviously with different user name and password):
Any help appreciated!
EDIT:
Well, I've done everything suggested by lewiguez below now, but it doesn't make any difference. I can't believe this should be so hard... I keep getting this error message in Sql Server Management Studio:
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) (Microsoft SQL Server, Error: 53)
Here's the process I follow for working with remote databases:
In VS 2008 under the Server
Explorer tab, right-click on "Data
Connections" and then click "Add
Connection"
Change the Data Source to
"Microsoft Sql Server"
Put in your fully-qualified
"Server Name" (be it IP Address, domain name, etc.), select "Sql Server
Authentication" and put in "User
Name" and "Password" for the database user
Select the database you want to connect to under "Select or enter a database name"
Hit "Test Connection" to test and then "OK" to accept
You should be able to interact with the database at this point by expanding the connection and then the "Tables" folder. For example, right-click on the Tables folder and you'll be presented with an "Add Table" option in the dialog. Right-clicking an existing table will bring up the "Open Table Definition" options where you can change any columns, etc.
If you're not getting to this point (and it sounds like you're not), I'd recommend checking your Sql Server connection from whatever machine you're using.
I generally do this by going into the Management Studio and connect with whatever credentials I'm trying to use. If they don't work, make sure they are, in fact, added as a Sql Server user and a database user (they have to be both).
Also, I would check in the Sql Server Surface Area Configuration Manager. You have to allow TCP connections and you have to be set up to allow Sql Server Authentication connections as well from remote hosts. If THAT'S all set up, but you still can't connect, I'd double-check to make sure your firewall is allowing Sql Server connections. The default port is 1433.
Also, if you can connect, but then can't write to anything, double-check your table permissions. Hope this helps!
I finally understood the problem: as I suspected the settings in my own installation was not the problem, but rather it was the settings on the Sql Server installation on my web host. And in fact I found a place in the control panel on my web host where I could set an exception to my ip address so that my ip would be granted access to the port 1433 for Sql Server, which is otherwise closed by default for security reasons.
I've had no luck finding any information about this at all on the internet, which I find strange. All the information I could find had to do with changing these settings on your own local installation of Sql Server. But I'm sure there are loads of people out there who like me use a web host for deploying their web site, and then that info doesn't seem to apply. (Perhaps apart from the TCP setting, which I think must be set, and there's detailed info about that here: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/ )
Hope this helps someone else who like me uses a web host. Now everything works fine for me at least, both in Management Studio and in Visual Studio Server Explorer.

Resources