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.
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
In Azure SQL I can query what temp tables currently exist by using the query -
select * from tempdb.sys.tables;
However, I am not able to find who created these. Surely there must be a simple way to find out who created these temp tables! There are links which suggest things, but all of that works on SQL Server, not Azure SQL.
Permissions
Any user can create temporary objects in tempdb. Users can
access only their own objects, unless they receive additional
permissions. It's possible to revoke the connect permission to tempdb
to prevent a user from using tempdb. We don't recommend it because
some routine operations require the use of tempdb.
The tempdb system database is a global resource that's available to all users connected to the instance of SQL Server or connected to Azure SQL Database.
By default, server admin, database owner or a user with required permission can access the tables of tempdb.
This official article on tempdb database is related to Azure SQL Database. Please go thorugh for more details and better understanding.
I am trying to create a free SQL Database in Azure under my DreamSpark subscription but I repeatedly receive the following error:
When you start an SQL Database creation, Azure lets you choose or create an SQL Server:
Since I don't currently have an Azure SQL Server I have to create one. I figured my error could be isolated to the server creation and effectively, while trying to create only the server, the error still rises.
I think that, even if Dreamspark subscription allows for a free small SQL Database, it does not allow for a free SQL Server. But this does not make any sense because I think there is no way to have an SQL Database without an SQL Server... So my questions:
Could you please confirm or refute my suspicion about Azure not permitting a free SQL Server in DreamSpark subscription?
In case it is not allowed, is there a way to create an SQL database without an SQL Server in Azure?
In case it is indeed allowed, why do I have this error then?
Thanks in advance.
I ended up circumventing this problem by using visual studio 2017 to create DB and DB Server for me. So we can be sure that DreamSpark subscription allows for a small DB AND a DB Server creation, which makes sense.
Still, don't know why I was getting that weird error though.
While creating the db, visual studio changed the name I provided by concatenating "dbserver" and "_db" to the server and db respectively. Perhaps, there was a naming issue that VS solved automatically, and that Azure is not reporting correctly.
I've set up Geo-replication on an Azure Database Server.
One of the databases running on the server has a login and user that I created through SSMS:
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-manage-logins
I cant connect to the failover database with that user. The user is visible in the replicated database, but the login is not visible in the master db. Moreover, chaning the connection string to point the the replication DNS name doesnt work.
Do I need to create the login manually on the failover?
You need to use contained users (those which are stored in the database, not in the masted database), that way you dont need to do anything.
https://learn.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-making-your-database-portable
I recently deleted a SQL server instance (with 2 sql databases) on my azure portal. I would like to know if there is a way for me to restore the deleted SQL server and the corresponding Sql databases.
I would appreciate any help/direction in this regard.
Thanks
Uma
When you delete SQL Server from portal, you will get a warning : Warning! Deleting xxx is irreversible. So the best solution to this is to open a support ticket.
You could also refer to Can we recover a deleted server for Azure SQL Database? for more information.
Microsoft might be able recover the databases under these conditions:
Another SQL Server with the same name was NOT created
Less than 7 days passed since the deletion
The Region, SQL Server and Resource Group name must be known
You need to log a support ticket. If the server can be recovered, it will be restored. The databases were not restored in my case, but could be recovered using the normal method for recovering a deleted SQL Database within a SQL server.
I was able to restore an sql server by contacting MS support through a support ticket in the Azure portal.
Key things that must be available:
The name of the Sql server and database
The resource group name and time of deletion.
You should not have created another sql server resource with the same name in an attempt to recover the sql server.
I had an ARM template of the resource group that I exported from the portal. Without this I would not have remembered the names of the resources above.
Key takeaways:
Ensure that users that is not the subscription holder cannot delete resources.
Export ARM templates for all RG's - this saved my b**.
Thanks to the MS team for helping me out so quickly! They helped me out within an hour! Great service!