Forum Widgets
Latest Discussions
Login Failed for user '<token-identified principal>' for Azure Active Directory Admin
Hello, I am having an issue where I am unable to connect to my Azure SQL database instance w/ my user that is the Active directory admin over the instance, along w/ the databases within that instance. I have been able to connect to this instance in the past with Management Studio. Now all of the sudden, I am unable to connect to any of my azure databases with this specific user. Non-admin accounts I can get into the instance and database, but my Active Directory Admin account is unable to log in. The error I am getting is: Login Failed for user '<token-identified principal>' There is not a lot (any) help on this issue and I'm hoping someone knows why and can help. I've tried changing the default db to one of the other dbs in this instance w/ no success. I am using Active Directory - Integrated Authentication and have also tried Active Directory - Password and Active Directory - Universal with MFA Support. Like I said, usually I will connect to these databases w/ no issue using Active Directory - Integrated. Not all the sudden it's throwing this error. I checked in my Azure environment and my user is still listed as the Active Directory Admin of this Instance/DB.MrGalvanAug 28, 2020Copper Contributor37KViews0likes5CommentsThe server you specified .database.windows.net,1433 does not exist in any subscription in email
Hi All. I have an application that is hosted in the azurewebsites.net. I had this configured sometime back and it still works. As i can still login to the website which is connected to a sql azure db and still works The db name is below (aspnetdb) Initial Catalog=aspnet-BehaviouralManagement Error when i try using Azure Data Studio/SSDT to connect to my database The server you specified .database.windows.net,1433 does not exist in any subscription in email address. Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. When i login to my azure portal i cant see it listed on my sql databases. But the application still works. I believe i can't setup the firewall since i can login to the database 😞 Any ideas how i can fix this. Thanks in AdvancePatrick RoteAug 15, 2020Iron Contributor28KViews0likes3CommentsAccess Microsoft SQL Server remotely with command prompt - Remote SQLCMD
One of my clients recently had an issue with their Microsoft SQL server which runs on top of Server 2012, we are unable to get the remote connection to the server but while the database installation I have configured the remote access to the database server. That is make so easy to troubleshoot and get the backup to the external drive via remote SQL command prompt. Here I will explain how we can easily configure the SQL server to allow remote connections from client machine which is available on the same network. In this demo I have SQL server 2019 installed in my laptop. Allow TCP/IP Connections in the SQL Configuration manager. Open SQL Server configuration manager in the server and open SQL Server Network Configuration. Expand it and find the protocols for your instance, here I am using the default SQLEXPRESS instance. In the right pane you will find the protocols called TCP/IP, by default status will be set to disabled, open TCP/IP by double click on the name. TCP/IP properties will open in a new window and enable it by set the drop down to Yes to the Enabled field. Then go to IP Addresses tab next to the protocol tab in the same properties window open. You will find number of IP addresses available in the configuration, it’s not a good secure practice to enable all the IP address but here I am going to use the IPALL for remote connection. In the bottom of the windows, you will find IPALL configuration with a default dynamic port. Clear it and set an available port in the TCP Port. I am using 5068 port. To find the established and available port number you can use the netstat -a -n -o command in the command prompt. Once done, enable the firewall rules for the port used in the previous step and restart the firewall. If you are testing in demo environment, simply turn off the firewall. Restart the SQL Server Services to apply the changed made in the configuration. The configuration in the server part has completed now. Below installation must be need in the client machine/s to access the SQL server database. Client SQL CMD Installation SQL CMD Utility is a tool with command line interface which helps to access the MS SQL database. Before install, the SQLCMD utility there are some other prerequires must be installed in order to install the sql cmd successfully otherwise you will encounter some errors as below. Here it’s requiring Microsoft ODBC Driver 17 for SQL Server, which helps to communicate between database and the applications. It can be downloaded from the following link – https://www.microsoft.com/en-us/download/confirmation.aspx?id=56567 If your windows is not in up to date the following update will be require in order to install the ODBC Driver, update can be downloaded from the below link https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145 If the client machine fulfilled the above two prerequires you can start installing SQLCMD utility tool in the client machine, SQLCMD can be downloaded from the below link. https://www.microsoft.com/en-us/download/details.aspx?id=53591 Once Command Line utility installed, we can connect to the database using the below command. sqlcmd -S DESKTOP-0AB9P2O,5068\sqlexpress -U sa -P yourpasswordhere The format should like this sqlcmd -S [Servername where SQL Installed], [Port Number configured earlier in the SQL Server Configuration Manager to allow remote connections] \ [SQL Server instance name] -U [Username] -P [Password] Now I am going to take the backup of Datastore database to my external drive (here my external drive is G). backup database DataStore to disk='G:\BackupDatastore.bak' So now without logged into the actual server I have copied the current backup to the external drive, so by configuring this method you can save the data incase if you get any Windows failures. Also by this you can make sure the database is running or not by following any kind of queries remotely.GohulanJan 18, 2021Copper Contributor28KViews0likes0CommentsAzure SQL Connection Timing Out all of a sudden
Hi All I have a Azure Function App and IoT Hub where my incoming data(once per min per device) gets saved to an SQL database. This has been working well for sometime, but in last day or so, i noticed message are not being saved into my SQL DB. After some investigation using Application Insight, I noticed the following error: It seems my pooling and DTU have increased suddenly. Can you someone help or advice on what could have gone wrong? Is there any server maintenance or issues going on in West Europe? System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)DJ200Mar 01, 2024Copper Contributor10KViews0likes1CommentLogin failed for user '<token-identified principal>' but works in Data Studio
Hi, I am trying to use my AD account to connect to the Azure SQL using Java 8, JDBC Driver, and my accessToken. When I use Data Studio using my AD Account, I can connect successfully to the Azure SQL DB. But when I use my Java Program then it gives me this error: Request processing failed; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '<token-identified principal>' My code abstract: SQLServerDataSource ds = new SQLServerDataSource(); ds.setServerName("NAME.database.windows.net"); ds.setDatabaseName("db-name"); ds.setAccessToken(accessToken); ds.setEncrypt(true); ds.setTrustServerCertificate(true); try (Connection connection = ds.getConnection(); Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery("SELECT SUSER_SNAME()")) { if (rs.next()) { System.out.println("dbResults => You have successfully logged on as: " + rs.getString(1)); res = rs.getString(1); } }Solvedrohit00x00Dec 06, 2020Copper Contributor9.6KViews0likes1CommentConnect to Azure SQL database with Point to Site Connection and Private Link
Hallo, I'd like to try to get the following done only somehow it doesn't seem to work I have configured a Logical Server within Azure with VNet and Private Link enabled Within this subscription I've a VM configured which you only get connected to when you have P2S connection enabled Client makes Point to Site VPN to Azure with AAD Authentication. When you connect with RDP to this VM with a private IP it is working fine. Connecting from this VM with SSMS to the Logical Server is working fine. Also the connection server.privatelink.databases.windows.net is working. When customers opens SSMS on his own laptop from home, he cannot make the connection to this Private Endpoint link. The only way to solve this issue is to allow allow Public Network Access And to add the home ip-adress of the customer, but this is something we don't want, because then I've to add for everyone his home IP Is there another way to achieve the situation below. Did I missed something in the documentation. My End Goal what I want to achieve is. Connect to my sql server through a P2S without adding home ip-address from customers. I've been reading the following link https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connectivity-architecture#connection-policy but then still my situation is not working. Who can help me out. Thank in advance8.8KViews0likes12Comments60MB Azure SQL database restore taking over 50 minutes?
I kicked off a restore of an Azure SQL Database via the Azure Portal. Its only 60MB in size and is LRS so expected it to be pretty quick. 50+ minutes later it is still "Restoring..." wondered is this normal? I don't have a support plan so not sure if just to leave it or create a support case. Is there anything in Azure platform where this is escalated if it takes too long or does it stay restoring forever until customers raise support tickets (at cost!). Appreciate any insights 🙂Solvedabri_dparkerJun 08, 2023Copper Contributor8.2KViews0likes9CommentsDeploying a Dacpac using SQLPackage
Hi, I'm trying to use SQLPackage to deploy a Dacpac using AccessToken authentication. I'm using the following command... .\sqlpackage.exe /Action:Publish /SourceFile:Database.dacpac /TargetServerName:xxxx.database.windows.net /TargetDatabaseName:DatabaseName /AccessToken:xxxx The error message I'm getting is: Unable to connect to target server 'xxxx.database.windows.net'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server. Login failed for user '<token-identified principal>'. Any ideas what's wrong here?Noddy285Mar 02, 2021Copper Contributor7KViews0likes1Comment
Resources
Tags
- azure sql database19 Topics
- azure sql16 Topics
- Managed Instance6 Topics
- sql server5 Topics
- development4 Topics
- SQL Connector4 Topics
- azure active directory3 Topics
- security2 Topics
- sql1 Topic