The database is not accessible objectexplorer что делать
Перейти к содержимому

The database is not accessible objectexplorer что делать

  • автор:

Sql Server Database not accessible

I have a big problem
The main database of my site is not accessible.

Can anyone guide me? What should I do?

Displays the following error when opening (expanding) this database in SSMS:

=================================== The database XXXDb is not accessible. (ObjectExplorer) ------------------------------ Program Location: at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent) 

150238-image.png

Sqlserver 2019
SSMS 18
Windows Server 2019

SQL Server

A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.

The database is not accessible (ObjectExplorer)

The users within a particular domain group are having trouble accessing all the appropriate databases via their SQL Server Management Studio client. They receive the error message, “The database is not accessible. (Object Explorer). Am I lacking some permissions. All the related databases are in a Multi_User mode, Normal Status. I’m using SQL Server 2005 Mgmt Studio. Thanks in advance for all the fwd solutions. Mathur

SSCrazy Eights Points: 9376
March 19, 2008 at 6:54 am #791413 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

There should be some error code, severity state.. Please check them. Check SQL Server log files and application log. Piotr

. and your only reply is slàinte mhath
SSC Eights! Points: 892
March 19, 2008 at 7:21 am #791427 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

Hi, The problem says——> Program Location: at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.GetChildren() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SummaryView.get_Items() at Microsoft.SqlServer.Management.UI.VSIntegration.AppIDPackage.ListViewVirtualStorage.CopyItems(ISummaryView summaryView) at Microsoft.SqlServer.Management.UI.VSIntegration.AppIDPackage.ListViewVirtualStorage..ctor(ISummaryView summaryView, List`1 columnDescriptors) at Microsoft.SqlServer.Management.UI.VSIntegration.AppIDPackage.RightPaneListViewer.PopulateView()

SSC Guru Points: 1004504
March 19, 2008 at 7:33 am #791435 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

Are there any errors in the sQL error log from around the same time? does that domain group have access to the DB in question?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

SSCrazy Eights Points: 9376
March 19, 2008 at 8:18 am #791456 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>
Do they have any SSMS plugins installed? They also tend to screw things sometimes. Piotr
. and your only reply is slàinte mhath
SSC Eights! Points: 892
March 19, 2008 at 8:53 am #791488 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>
The domain has all the relevent access to the related Dbs.
SSChampion Points: 13653

I had this once where you could not view the tables when someone was running a hugh update statement and then i could not view the tables. Is any process running that is active.

SSCertifiable Points: 5440

Hello, I think that your problem is as follow, someone as revoke the view existing databases to your user or from public. use master go revoke view any database from public go You could try one of the following command to try to revert the situation. grant view any database to go or grant view any database to public. go Hope this can help you. Regards �� JMSM

SSC-Addicted Points: 475

I just had this occur with all user databases on one of our SQL 2005 servers. It turned out to be the database owner. The DBA’s domain account was the owner of two of the databases and there was no owner for several others. I changed the owner on these databases to ‘sa’ and access was once again granted for our developers. I figure the original post has been long corrected, but this may help someone else in the future.

SSC Enthusiast Points: 109

Recently had this issue. Turned out that the drive holding the .ldf was full. Shrank another ldf on that drive to free a bit of space, bounced SQL — db came online. Shrank the problem database log. Job done.

SSC Veteran Points: 269
June 14, 2012 at 1:18 pm #1501233 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

Here’s something else to try, if you’ve come here looking for suggestions: 1. Log into SSMS as the user for whom the DB in question isn’t accessible. 2. Right-click on the inaccessible DB 3. Click ‘Properties’ If you see an error message indicating that a ‘Server Principal’ does not have access to the DB, re-login as ‘sa’ and give that ‘Server Principal’ access to the DB in question ( Logins->->Properties->User Mapping ). This should open up the DB in question for the user who is getting the ‘inaccessible’ message. I hope this info is helpful.

SSC Journeyman Points: 91
May 19, 2013 at 11:19 pm #1616510 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>
Hi, Login with the problem db as default db is not able to connect to server. Thanks, Pavan
SSC Guru Points: 116520
June 24, 2013 at 2:21 pm #1626914 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>
I get the error the Database is not accessible for a user. What is wrong? I can’t find an answer.

For better, quicker answers on T-SQL questions, click on the following.
http://www.sqlservercentral.com/articles/Best+Practices/61537/ For better answers on performance questions, click on the following.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

SSC Guru Points: 1004504
June 24, 2013 at 2:27 pm #1626916 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

Please post new questions in a new thread and give as much information example as possible, including exact error messages, anything unusual in the error log, etc.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

SSC Guru Points: 286573
June 24, 2013 at 2:28 pm #1626917 Edit | Close | Stick (to front) | Merge | Trash | Spam | Reply —>

Welsh Corgi (6/24/2013) I get the error the Database is not accessible for a user. What is wrong? I can’t find an answer.

What have you tried? Did you read through this thread (which by the way is from 2008)? You really should start your own threads instead of hijacking another one. We can’t help you find an answer because we don’t have any idea what you have tried or any details about what is going on.

_______________________________________________________________ Need help? Help us help you. Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions. Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/. Cross Tabs and Pivots, Part 1 – Converting Rows to Columns — http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 — Dynamic Cross Tabs — http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) — http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) — http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 15 posts — 1 through 15 (of 17 total)

The database is not accessible objectexplorer что делать

Есть файл mdf с другого компа с разными учетными записями
При замене файла mdf на другой пишет the database is not accessible. (objectexplorer)
Если делать attach :

Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘nt2’. CREATE DATABASE is aborted.
Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘nt2’. CREATE DATABASE is aborted.
Msg 9003, Level 20, State 1, Line 1
The log scan number (5611:196301:37) passed to log scan in database ‘nt2’ is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

Как подсоеднить это mdf??

Re: the database is not accessible. (objectexplorer)

От: _ABC_
Дата: 01.10.12 10:03
Оценка:

Здравствуйте, InfoPilot, Вы писали:

IP>Как подсоеднить это mdf??
Подсунув правильный ldf. Можно еще попробовать убрать ldf-файл, но не факт, что получится.

Re: the database is not accessible. (objectexplorer)

От: _DNA_ http://sql.pingvin4ik.info/
Дата: 04.10.12 14:25
Оценка:

Здравствуйте, InfoPilot, Вы писали:

IP>Есть файл mdf с другого компа с разными учетными записями
IP>При замене файла mdf на другой пишет the database is not accessible. (objectexplorer)
IP>Если делать attach :

IP>Msg 1813, Level 16, State 2, Line 1
IP>Could not open new database ‘nt2’. CREATE DATABASE is aborted.
IP>Msg 1813, Level 16, State 2, Line 1
IP>Could not open new database ‘nt2’. CREATE DATABASE is aborted.
IP>Msg 9003, Level 20, State 1, Line 1
IP>The log scan number (5611:196301:37) passed to log scan in database ‘nt2’ is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

IP>Как подсоеднить это mdf??
Можно попробовать эти варианты, и в первом и во втором случае должен создаться пустой журнал транзакций. Но вообще, и при аттаче из визарда, вроде есть возможность удалить не найденый файл лога.

USE [master] GO CREATE DATABASE [nt2] ON ( FILENAME = N'path\nt2.mdf' ) FOR ATTACH GO USE master GO
CREATE DATABASE nt2 ON PRIMARY (FILENAME = N'path\nt2.mdf') FOR ATTACH_REBUILD_LOG GO

«Лучше знать лишнее, чем ничего не знать» (с)

The database is not accessible objectexplorer что делать

Сообщения: 9
Благодарности: 0

SQL сервер запущен, надо было поставить в настройках TCP ip.
Получилось зайти под локальной админкой в Managment Studio, а дальше проблемы, при открытии своей БД пишет следующее
TITLE: Microsoft SQL Server Management Studio
——————————

The database ‘name database’ is not accessible. (ObjectExplorer)

OK
——————————
А если вызвать у БД свойства то будет ошибка связанная с правами доступа.

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

Так же при создании нового пользователя появляется ошибка
TITLE: Microsoft SQL Server Management Studio
——————————

Unable to cast object of type ‘System.DBNull’ to type ‘System.String’. (Microsoft.SqlServer.Smo)

Сообщения: 9
Благодарности: 0

Все, проблема решена, хотя хотелось бы выяснить почему так случилось. Ну понятно, что от ввода в домен все пострадало, но почему? Из-за преобразования админской учетки в админа домена??
Вообщем помогла статейка с хабра — http://habrahabr.ru/post/191462/
Если коротко, то останавливаем sql сервер, заходим в свойства, Вкладка Advanced, добавляем к параметру Startup Parameters -m;, включаем сервер.

После этого база стала открываться, создание пользователей заработало, создали админа бд, опять остановили сервер, удалили параметр, запустили и вошли под только что созданным.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *