I have a SQL Server 2012 database that I want to migrate to Azure SQL using the Data Migration Assistant v5.2. When I get to the Select Target section, I enter a SQL Authentication account that is in the dbmanager group. I get an error:
VIEW SERVER STATE permission was denied on object 'server', database 'master'.
The user does not have permission to perform this action.
And can go no further.
How do I get past this?
Thank you,
Dep
To run an assessment(DMA), you have to be a member of the SQL Server sysadmin role.
Please ref: https://learn.microsoft.com/en-us/sql/dma/dma-overview?view=sql-server-ver15#prerequisites
There are two workarounds we could found before we migrate the on-premise SQL server to Azure SQL:
Workaround 1:
From the SQL Server Management Studio via statement:
Connect to the on-premise SQL instance
Select New Query
Use the following statement
GRANT VIEW SERVER STATE TO "AccountName"
Workaround 2:
Update your SSMS to a new version.
Related
I have a SQL database created and I am trying to deploy/move that database to the Azure Cloud by using the Deploy Database to SQL Azure Wizard in SQL Server Management Studio. But I have ran into an error after trying to deploy it. I am using the SQL Authentication to log in with my credentials. I also tried installing the Data Migration Application.
The error is:
TITLE: Microsoft SQL Server Management Studio
One or more unsupported elements were found in the schema used as part of a data package.
Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12.
(Microsoft.SqlServer.Dac)
BUTTONS:
OK
I don't understand what this error means and also I don't understand why this error is happening. I looked on the internet for possible solutions but could not find any information. Please help me.
SQL Azure and regular SQL Server aren't entirely compatible.
One of the things that is enabled on regular SQL Server is the guest login. This login allows connection to instance, with a default database of master. Once connected, the user can switch to a different database (use [thedatabase]) if they have the authority to do so.
But in SQL Azure, you connect directly to a single database, and can't switch databases on the connection. So the guest account has no function.
On your source instance (the one you want to migrate), you can revoke this ability so that the wizard won't try to migrate it. Execute revoke connect from guest on your on premise instance.
I just installed SQL server 2014 however, I have a problem creating the database or even view properties.
I get "VIEW SERVER STATE permission was denied on the object 'server', database 'master'. Microsoft Server, Error:300"
I cannot alter my server roles, I have only "Public" role for some reason.
any ideas?
connect to ssms using administrator(sysadmin) account and execute the below
USE MASTER
GO
GRANT VIEW SERVER STATE TO [username]
From SQL Server Expert
Login user do not have VIEW SERVER STATE permission and granting the required permission solves the issue.
USE MASTER
GO
GRANT VIEW SERVER STATE TO <username>
Just for reference, this problem seems to be related to this bug.
I have the same problem with SQL Server Management Studio 2012.
If anyone finds stuck with this problem, try to update the SQL Server Management Studio. This way, you don't need to grant the permission VIEW SERVER STATE to the user.
Using SQL Server Management Studio 2014 (12.0.4213.0) now, and the problem seems to be gone
Installed SQL server 2014 using
en_sql_server_2014_management_studio_with_service_pack_2_x64_9009295.exe
First, I am not getting the screen where you can create default instance and create sa login. So once it got installed, I go to SQL Server Express and logged in with Windows Authentication, but I see a Red downward arrow for sa login under Security\Logins. This makes me unable to create database giving error
CREATE DATABASE permission denied in database master. (Microsoft SQL Server, Error:262)
Please advise!
change the type of authentification from windows authentification to sql server authentification and give the dbowner to sa in master database
I've started RDS SQL Server. At that moment a master user was created as well. I can connect to my SQL server with SQL management studio. The question is why doesn't my user have sysadmin role?
Its one of the tradeoffs when using SQL Server on RDS, you don't get complete administrator-level access to the server.
This page tells you the restrictions you will have:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html
In a SQL Server 2008 R2 database, I created a user login with:
Server Role: Public
User Mapping: master, model, msdb
Database Role Membership db_datareader, public
When I use with new user login to connect it connects and I can run update, create commands. Which I don't want to run.
The same setting I tried in SQL Server 2012. It didn't allowed me to run update and create commands.
I get an error :
CREATE TABLE permission denied in database 'TEMP'.
In SQL Server 2012 I have a different database.
Please give solution
I have followed this https://www.itsupportguides.com/server-side-tips/sql-management-studio-how-to-create-read-only-users/
for this Login
mark SERVER Role for following Databases as db_DenyDataReader , and db_DenyDatawriter