I am trying to scale Azure SQLDW by following this document => azure link but help guide says, to run query under master DB.
I am logging in using system admin credential,
what am i missing.
Azure SQL DW master DB is the same with Azure SQL Server.
Please run the query in Database--System Database--master.
Login your Azure SQL DW with admin account, set the connect to database.
Step 1
Step 2
Step3
Hope this helps.
Given the first screen shot, it appears that you've connected to the user database and not the server with the default database. When connecting to your server in SSMS, click on the Connection Properties tab and make sure the Connect to database: value is set to <default>.
Connection Properties
Related
I am using Logic Apps Designer on Azure to move source data to a storage file and I need to connect to a database on my SQL Server. To do this, I am using an on-premise connection througha gateway. I was able to successfully connect to my SQL Server database, however, when I am using Logic Apps action, not all tables are available on Logic Apps. Is there a security/permissions/connections issue that is preventing all tables from the SQL Server database not to return to Logic Apps?
enter image description here
enter image description here
I tried refreshing/restarting Azure and also tried connecting through with other authentications hoping more tables would return, but no luck.
I would suggest you to create a new api connection to sql and try to access tables again. There might be issue with connecting to db.
One of the alternative approaches to get row from sql db is using execute query action in logic app.
As shown in above picture, Execute a SQL query (V2) action is used to query table and retrieve records based on condition.
Reference link
I get randomly from time to time error Login failed for user '***' when the application tries to connect with Azure SQL Database.
In most cases application has no problem with logging in to that user, unfortunately from time to time I get such an error. DB hasn't problems (at least I don't see any of them) isn't overloaded no alerts, only that problem that happens from time to time
Login failed for user ‘***’
The error occurs when the username or password or there’s something missing in the connection string. You can check the Azure SQL log-in logs in the Audit Logs section of your Azure SQL server and you can explicitly view #sys.event_log logs table to check the connectivity failures of your Azure SQL.
I created one console app and reproduced the same Login failed for user error where my db name in the connection string is wrong, Similar error might occur if you add an incorrect password or if a password change is not updated in your connection string Refer to below:-
You can enable Audit Logs for your Azure SQL DB like below to get more insights on the connection failure:-
Audit Logs are sent to Log analytics like below:-
Database Authentication logs :-
You can also auto-resolve the connection issue by visiting Diagnose and solve problems section of your Azure SQL DB where you can select your issue and Azure will run diagnostics queries/recommendation on your Azure SQL DB like below:-
For Connectivity -Connection Timeouts issues, Query is recommended like below:-
You can also query the connection failed logs directly in the SSMS like below:-
Select * From sys.event_log
Reference:-
sys.event_log (Azure SQL Database) - SQL Server | Microsoft Learn
Azure SQL Auditing for Azure SQL Database and Azure Synapse Analytics - Azure SQL Database | Microsoft Learn
I have created an Azure SQL database and now want to use that database in an Azure Logic App where I need to connect to the database using connection name of that SQL database. I'm following this tutorial from Azure official team where at one step I need to enter connection name. But I cannot find the connection name in Azure Portal for my Azure SQL Database. If you look at the Connection Name field in the dialog box of step 3, you see you need to enter the connection name. Question: How can I find connection name of my Azure SQL db?
UPDATE
I'm using this tutorial from Azure official documents to create Azure SQL db and I don't see any place where connection name was provided by me.
You can enter any name.Some info from Documentation .
The connection name is a name you provide for the collection of properties related to your connection to Azure SQL DB.
I copied many times an sqlDatabase but i can only access with my user.
As read in the documentation, the principal became the user who started the operation.
So i tried using the sql statement to copy the database logged as the sql server administrator, but invain.
I can't access to copied database with the original sql server principal.
I need to keep this super user on all the server databases.
There is no problem. I can connect to all the databases copied.
There is only a visible difference in Sql Server Management Studio.
It is a connection option:
if I connect with Connect to Database: default, I can see all the databases on my server.
if i choose a single one, i can see only it.
(This is for an Azure SQL Database)
Just about every article says at the start to "connect to the master database" before creating a new DB.
I have connected to my Azure SQL Database server with SSMS 2014 with no problems. I see the master DB under System Databases. I right-click on Databases (this is above System Databases) in the tree on the LHS and click New Database...
The template query comments area says among other things "...connect to master..." which implies to me that I am not connected to the master.
I am obviously missing something very fundamental and obvious regarding basics.
Can someone please put me out of my misery :)
PS When I click "New Database..." when connected to my non-Azure SQL Server 2012 I get a GUI and I am able to create a DB no problem.
You do not need to explicitly connect to master to create a database in Azure SQL DB. Please follow the steps here to create a database in Azure SQL DB.
https://azure.microsoft.com/en-us/documentation/articles/sql-database-get-started/
Also, can you please give me links to the articles that mention "Connect to master" so I can take a look and correct them if needed? Thanks.
I believe you are referring to the below template. You are actually connected to the master database and this is just a template instructions. If you are in doubt query select db_name() This should return 'master' for the master database.
If your connection string either specified database name as master / nothing it will be connected to master database.
-- ==========================================================================================================
-- Create database template for Azure SQL Database
-- This script will only run in the context of the master database. To manage this database in
-- SQL Server Management Studio, either connect to the created database, or connect to master.