Cannot show requested dialog sqlmgmt как исправить

Fixes an issue that triggers a "Microsoft SQL Server, Error: 297" error message when you try to view properties of a database in a SQL Server 2012 instance.

SQL Server 2012 Business Intelligence SQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Express SQL Server 2012 Standard SQL Server 2012 Web SQL Server 2012 Enterprise Core More…Less

Microsoft distributes Microsoft SQL Server 2012 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2012 fix release.

Symptoms

Consider the following scenario:

  • You create a new SQL Server login ID and then assign the login ID as the owner of a database on a Microsoft SQL Server 2012 instance.

  • You log in to the SQL Server 2012 instance by using the new login ID.

  • You try to view properties of a database in the SQL Server 2012 instance.

In this scenario, you receive the following error message:

Cannot show requested dialog.

Additional information:

Cannot show requested dialog. (SqlMgmt)

An exception occurred while executing a Transact-SQL statement or batch.

(Microsoft.SqlServer.ConnectionInfo)

The user does not have permission to perform this action. (Microsoft SQL Server, Error: 297)

Cause

This issue occurs because VIEW SERVER STATE permission is required when you try to view the database property.

When you click Database Properties, SQL Server Management Studio (SSMS) runs queries against the following dynamic management views (DMVs): 

  • sys.dm_hadr_cluster

  • sys.dm_database_encryption_keys

These DMVs are new to SQL Server 2012 and require server-level permissions. 

Resolution

Cumulative update information

SQL Server 2012

The fix for this issue was first released in Cumulative Update 2 for SQL Server 2012 Service Pack RTM. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2703275 Cumulative update package 2 for SQL Server 2012Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2012 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

2692828 The SQL Server 2012 builds that were released after SQL Server 2012 was released Microsoft SQL Server 2012 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2012 Service Pack RTM hotfix to an installation of SQL Server 2012 Service Pack RTM. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Workaround

To work around this issue, grant VIEW SERVER STATE permissions to the login ID that you created.

Need more help?

imageПри работе с базами данных в Microsoft SQL Server Management Studio можно столкнуться с ситуацией, когда попытка открыть свойства какой-либо базы данных приводит к ошибке:

Cannot show requested dialog. (SqlMgmt)
Property Owner is not available for Database '[XXX]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)

image

Причиной этой ошибки является невозможность определения владельца базы данных. Такая ситуация возможна, например, если владельцем базы ранее была назначена какая-либо доменная учетная запись, которая на текущий момент в домене отсутствует.

Наличие проблемы в определением владельца базы может подтвердить хранимая процедура sp_helpdb:

sp_helpdb [Имя базы данных]

image

Чтобы избавиться от этой проблемы, достаточно с помощью ещё одной хранимой процедуры sp_changedbowner изменить владельца базы на другую существующую учетную запись, например на встроенную учетную запись sa.

USE [Имя базы данных]
EXEC sp_changedbowner 'sa'
GO
sp_helpdb [Имя базы данных]

image

После этого возможность открытия диалоговой формы свойств базы данных будет восстановлена.

  • Remove From My Forums
  • Question

  • Hello,
    I would like to look at database properties using SQL Server Management Studio
    2014.
    In Object Explorer, I right-click on any database …

    Then I click on Properties and get the following error …

    Thank you,

    Robert Lorbeer

    rlorbeer@gmail.com

Answers

  • You are not going to find any documentation from MS on that error.  MS is horrible about publicly documenting SSMS error messages.

    That error message is a generic message which can have many causes.  If you really want an answer from MS, you can contact MS support and pay a fee to get an answer.

    That error may be caused if the database owner no longer exists.  However, in that case I have not seen  the get_azureedition() error.

    • Marked as answer by

      Monday, February 22, 2016 7:50 AM

  • >> It just so happened that when I did the screen print SQL Server Agent was not running.  Therefore there were white circles on the server names.

    The fact that SQL Server Agent was not running has nothing to do with the
    white circles on the server names. You can stop the Agent and check that it is OK. You probably restart the SSMS or there was another reason that the SSMS successfully got the status information.
    If the Agent is not runnig but the SSMS get the status ok then as I mentioned above, the Agent will get red color and the server will get green color

    Anyhow, I see that this is not relevant to the issue now :-)

    >> Where does Microsoft document the error message?

    * The first response that you got here is the documentation of this error message

    Please check if this link help you (there are several Workaround options)

    -> https://support.microsoft.com/en-us/kb/2889492

    >> Is it possible that this message is mysteriously appearing in Microsoft code and no programmer actually put it there?… What
    specifically is causing the error message?

    A machine cannot think yet and each error massage was written by developers ;-)
    Therefore a message cannot be mysteriously appear, but an error message may be ambiguous in some cases, or the same message might appear in several different situations. The situation that a message appear depend on the developing but the reason might
    be mystery, until we find it :-)


    • Edited by
      pituachMVP
      Tuesday, February 16, 2016 6:05 PM
    • Marked as answer by
      Lydia ZhangMicrosoft contingent staff
      Monday, February 22, 2016 7:50 AM

I hit the following issue this morning when I tried viewing the properties of a SQL Server database using SSMS:

Microsoft SQL Server Management Studio
Cannot show requested dialog.
ADDITIONAL INFORMATION: Cannot show requested dialog. (SqlMgmt) Property Owner is not available for Database ‘[databasename]’. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

You might think this is indeed permission related by the error message, but it turned out to be because the database owner was NULL (empty).  I’m not sure how or why this happened, and some forums suggest this can happen even when the owner is not set to SA.  Obvisouly I couldn’t check this through SSMS, so I ran the following query to find out the owner of each database through a T-SQL script:

SELECT name,
       suser_sname(owner_sid) AS owner,
       state_desc
FROM   sys.databases

For a SQL Server 2000 instance, you can use this:

SELECT name,
       suser_sname(sid)
FROM   sysdatabases

This revealed NULLs for a couple of databases in the instance, so I set the owner to SA using the following:

USE Northwind
EXEC sp_changedbowner 'sa'

…tried accessing the properties through SSMS again and it worked like a charm 😉

I think something happened to an mdf file on disk.
When I try to start SQL Server Mgmt Studio (SQL Server 2008, Win 7 x64), I get an error:
«Cannot open user default database.»
Since I can’t connect at all, how do I fix this?
I have tried connecting to other dbs using osql, but always get an error.

Thanks for any workarounds…

asked Dec 2, 2009 at 23:49

Number8's user avatar

The easiest way to do this is via command line. You keep opening connections using SSMS that fail…

Using command line you’ll have one connection and delimit the login name correctly: «[SVRUSR]»

sqlcmd -S InstanceName -d master -E -Q"ALTER LOGIN [SVRUSR] WITH DEFAULT_DATABASE = master"

or replace -E with -U SQLLogin -P Password if you have a SQL login handy

answered Dec 3, 2009 at 6:13

gbn's user avatar

gbngbn

417k81 gold badges581 silver badges670 bronze badges

1

When connecting from Management studio, In the «connect to server» dialog box, before connecting, click «Options» and change the «Connect to database» dialog box to «master».

answered Dec 2, 2009 at 23:54

Nestor's user avatar

NestorNestor

13.5k11 gold badges76 silver badges119 bronze badges

6

Login as an administrator and change your default database: ALTER LOGIN ... WITH DEFAULT_DATABASE = .... If you’re not an administrator, ask an administrator to do it. If you must log in in the database in question, ask an administrator to investigate whi the database is offline.

answered Dec 3, 2009 at 0:58

Remus Rusanu's user avatar

Remus RusanuRemus Rusanu

286k40 gold badges430 silver badges565 bronze badges

4

I am having trouble with sql manager after install SQL 2005 SP3,

Can any shed any light on this one.

Thanks

TITLE: Microsoft SQL Server Management Studio

Cannot show requested dialog.


ADDITIONAL INFORMATION:

Cannot show requested dialog. (SqlMgmt)


Method not found: ‘Microsoft.SqlServer.Management.Smo.Edition Microsoft.SqlServer.Management.Smo.Information.get_EngineEdition()’. (SqlManagerUI)


BUTTONS:

OK

Shane Madden's user avatar

Shane Madden

114k12 gold badges176 silver badges249 bronze badges

asked May 8, 2009 at 11:11

optician's user avatar

answered May 8, 2009 at 21:23

MarlonRibunal's user avatar

MarlonRibunalMarlonRibunal

2831 gold badge3 silver badges8 bronze badges

If it was a databases’s properties you were trying to look at, check the owner of the database you are trying to look at. It might be orphaned — you can use

EXEC sp_changedbowner 'sa'

and see if that helps
(doesn’t have to be sa — whatever the appropriate account is)

answered May 11, 2009 at 20:11

CPU_BUSY's user avatar

CPU_BUSYCPU_BUSY

2,33217 silver badges17 bronze badges

There could be some missing SQL Server SMO assembly files. To solve this, just follow this procedure:

  1. Look for an installation which works fine
  2. Copy all files from C:Program FilesMicrosoft SQL Server90SDKAssemblies folder and paste it in C:Program FilesMicrosoft SQL Server90SDKAssemblies of the machine with the corrupted installation.
  3. Don’t overwrite any file. Just copy the missing files

answered May 8, 2009 at 11:53

splattne's user avatar

splattnesplattne

28.4k20 gold badges97 silver badges147 bronze badges

2

Is it possible that you applied the service pack to a different instance than the one to which you are attempting to connect?

answered May 11, 2009 at 17:27

Kara Marfia's user avatar

Kara MarfiaKara Marfia

7,8925 gold badges32 silver badges57 bronze badges

If you don’t have enough privileges to see that dialog, SSME will throw that error. Check your users privileges.

answered May 12, 2009 at 15:41

maxtopus's user avatar

maxtopusmaxtopus

1002 silver badges9 bronze badges

I recently restored a database to the same instance it was backed up from (SQL Server 2008 R2 Enterprise) and found that I couldn’t access the database properties.

I have done the following:

  • Checked the database owner was set correctly using sp_helpdb.
  • Changed the database owner to sa. Not a fix.
  • Changed the database owner back to my sysadmin user. Not a fix.
  • Issued DBCC updateusage against the affected database. Not a fix.
  • Run DBCC CheckDB on a restored copy to another instance. No corruption found. The restored copy (from the same backup file) did not throw any errors when accessing the database properties window.

Can anyone help?

The error message I get when trying to view properties is:

Cannot show requested dialog. (SqlMgmt)
Property Size is not available for Database ‘[DBNAME]’.
This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

I am a sysadmin on this instance.

Update: As suggested I created a new user, made it sysadmin and changed the database owner to it. Not a fix unfortunately. I will see if a profiler trace yields anything useful.

Update: Aaron — the original database was renamed and taken offline but is still on that instance. The backup of that database was then restored using the original name. The filenames of the new database files are different from the original as they live in the same folder as the original mdf/ldf. The restored db is currently driving our critical apps as normal.

asked Sep 17, 2015 at 9:46

Peter's user avatar

PeterPeter

1,4801 gold badge15 silver badges35 bronze badges

3

I have resolved this by restarting the SQL Server service, unfortunately/fortunately.

My initial idea was to detach/attach the database. Not that I thought this would actually fix the problem, I just read that in a forum somewhere. This had no effect.

I regrettably did not do what PJ Mahoney suggested re: running a trace. I hope I see this issue again so I can find out if a trace reveals anything. Thanks for the suggestion.

At least answering my own question means I don’t have to see another suggestion about changing the database owner ;P

Thanks

answered Sep 22, 2015 at 21:14

Peter's user avatar

PeterPeter

1,4801 gold badge15 silver badges35 bronze badges

I had this same error when trying to modify the file growth properties of the log file of a production database. I tried using SSMS and had the same error:

Property size is not available for XXX database.

I used T-SQL to modify the database log file instead.

USE [master]
GO
ALTER DATABASE [MyDatabase] MODIFY FILE ( NAME = N'MyDatabase_log', FILEGROWTH = 524288KB )
GO

After the command completed I was able to open the database properties in SSMS.
I hope this works for others.

LowlyDBA - John M's user avatar

answered Feb 3, 2016 at 17:45

Mark S.'s user avatar

Mark S.Mark S.

511 silver badge1 bronze badge

2

This can happen on very busy databases or even if the database is not a busy one in general, but at the moment it’s executing a statement that is rapidly changing the log file size. For instance, if you try to delete a very large number of rows (millions) from a table, the engine will have to log every row in for rollback purposes, which will force the log file to grow rapidly. While this is in progress, if you try to open the database properties in SSMS, you will see the error message «property size is not available..»

Another way to reproduce it is as follows: take a very large database (100+ million rows), and execute an ALTER TABLE statement on it (e.g. convert a char column to a varchar). See your log file blow up in hunderds of megs or even gigabytes per second. Again, while this is happening, you SSMS will not be able to give you the database size because it’s changing too fast to be accurate.

Needless to say, please don’t try this on live servers. :)

answered Mar 26, 2016 at 4:33

Xotic1's user avatar

Just came across this and from a trace, apparently this got blocked by an INDEX REBUILD operation that was running

My specific error was

Property SpaceAvailable is not available for Database ‘[dbOverwatch]’. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

SELECT
(SELECT SUM(CAST(df.size as float)) FROM sys.database_files AS df WHERE df.type in ( 0, 2, 4 ) ) AS [DbSize],
(SUM(a.total_pages) + (SELECT ISNULL(SUM(CAST(df.size as bigint)), 0) FROM sys.database_files AS df WHERE df.type = 2 )) AS [SpaceUsed]
FROM
sys.partitions p join sys.allocation_units a on p.partition_id = a.container_id left join sys.internal_tables it on p.object_id = it.object_id

It must have a very low timeout value, but maybe you can check if you have anything getting blocked when you try to access the properties

answered Oct 31, 2018 at 20:12

Thiago Dantas's user avatar

1

I get this error message during deployment of a SQL Server database tools solution against the database (on SQL Server 2008 R2). After the deployment finishes, the error is gone.
It’s a little nasty because neither is the DB in Single User mode or readonly (of corse not) or anything else indicating the reason.

answered Jul 6, 2016 at 16:00

Magier's user avatar

MagierMagier

4,6978 gold badges40 silver badges83 bronze badges

Know about SQL Server Error 916 and How to Fix It!

SQL Server is a relational database management system developed by Microsoft while focusing on large enterprise environment work over a network. The First version of SQL Server is 1.0 and released in the year 1989, the latest version is MS SQL Server 2016 Community Technology Preview 2.4 (CTP 2.1) released on September 30, 2015.

Problem

Accessing the SQL server database by using SQL Server Management Studio having a limited number of permissions (database read or write) may produce the SQL Server Error 916 and the message displayed on the screen is – “The server principal username is unable to access the database databasename under the current security context.”

The main problem is due to bugs present in SQL Server Management Studio that prevents the user to connect to the database and refuses to display the database list. There may be several other reasons behind the getting SQL Server Error 916.

  • The user is not permitted to view the data of selected column within the database.
  • The database is currently not available.
  • There are multiple columns such as Size, Space available, Data Space Used, Default file group, Index Space Used, Mail host, Primary file path and user has added at least one of them to the list of Object Explorer Details.
  • If the Auto Close option for the database is enabled, then Collation column cannot be retrieved by SQL Server Management Studio (SSMS).
  • For a database, Collation column contains NULL.

Due to the above causes, the error message will be displayed to the user.

SQL Error 916 – Symptoms

The symptoms of the SQL Server error 916 may vary depending upon the different scenarios explained further:

Symptom 1:

In SQL Server 2008, if a user tries to expand the database folders under a node even if he is not a member of a Sysadmin fixed server role or does not have the authority to access the database. If the guest user wants to expand the database nodes, connection permission is required otherwise; the following error message will be displayed:

Failed to retrieve data for this request (Microsoft.SqlServer.Manager.Sdk.Sfc)

Additional information:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Symptom 2:

In SQL Server 2005, if a guest user who is neither a member of a Sysadmin fixed server role, nor having the permissions is able to expand the database node but cannot view the database properties. In this case, the user will receive the following error message:

Cannot show requested dialog.(SqlMgmt)

Additional Information:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Note: SQL Server error 916 is displayed even though the user is a database owner of that database.

Symptom 3:

A product of the Microsoft family, Microsoft Office Communications Server 2007 (OCS 2007) is affected by this issue and the services will not start even after the server is started. The following error message will be invisible in the Event Viewer:

Event Type: Error
Event Source: OCS User Services
Event Category: (1006)
Event ID: 30962
Date:
Time:
User: N/A
Computer: ‘computer name’

Description: Connection to back-end database succeeded, but failed to execute registration-stored procedure on back-end. This error should not occur under normal operating conditions. Contact product support.

Back-end Server: ‘server name’ Database: ‘database name’ Sql Native error: 916 Connection string of: driver={SQL Native Client}; Trusted Connection=yes; Auto Translate=No; Server=’server name’; Database=’database name’

Cause: Possible issues with back-end database.

Resolution: Ensure the back-end is functioning correctly.

The above-mentioned symptoms are most common and lead to SQL Server Error 916 for SQL Server Management Studio. If the user found any of them, he may try the best possible solutions described below in order to remove the error.

Resolving the Symptoms

In order to view the granted permissions for the guest-user, the following command is helpful if run by a member of a Sysadmin fixed server. The query is as follows –

USE msdb;
 SELECT prins.name AS grantee_name, perms.*
 FROM sys.database_permissions AS perms
 JOIN sys.database_principals AS prins
 ON perms.grantee_principal_id = prins.principal_id
 WHERE prins.name = ‘guest’ AND perms.permission_name = ‘CONNECT’;
 GO

On running the above command, a table is presented to the user containing all the attributes of guest user.

However, an empty result shows that guest user is disabled in the database and again the SQL Server error 916 will be displayed. To overcome the error you may perform the following available solutions.

How to Remove the SQL Server Error 916:

To remove the error for accessing the database, the user can perform the following solutions. Any one of them will help you.

Solution No. 1

  1. Select the Object Explorer Details under View section within the SSMS.
  2. Right click on Column Header and deselect Collation.
  3. Refresh the server and operate a database.

Solution No. 2

  1. Click on View > Object Explorer details from the menu option of SSMS.
  2. Within Object Explorer window, click on Database folder.
  3. Right – click on the column header and select Reset View.
  4. In order to perform the final step, refresh the Database folder.

Solution No. 3

  1. Check the Auto Close setting of the database, set it to False and proceed further.

The above-described solutions may resolve the problem and the user can proceed the workflow.

Conclusion

With the help of this page, an individual can be aware about the SQL Server error 916, the problems occur due to it, what are the causes. Thus, a user can get the detailed knowledge about the SQL server and the possible error message displayed if the guest user wants to expand the database node in order to view its data.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Cannot send session cache limiter headers already sent как исправить
  • Cannot run preview graph amcap как исправить
  • Cannot retrieve speedtest configuration error http error 403 forbidden
  • Cannot retrieve record native error 10026
  • Cannot restore system mounted read only twrp как исправить

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии