Cannot obtain SQL Server service information - WMI issue?

4

I right click an SQL server database MyDB in SSMS and select "start powershell". However, I got the following error. And it's quite slow?

WARNING: Could not obtain SQL Server Service information. An attempt to connect to WMI on 'MyServer' failed with the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
cd : SQL Server PowerShell provider error: Could not connect to 'MyServer\MyDB'. [Failed to connect to server MyServer\MyDB.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]

At line:1 char:155
+ ... MyServer\MyDB'']/Database[@Name=''MyDB'']'|cd}
+ ~~
+ CategoryInfo : OpenError: (SQLSERVER:\SQL...s\MyDB:SqlPath)[Set-Location], GenericProviderException
+ FullyQualifiedErrorId: ConnectFailed,Microsoft.PowerShell.Commands.SetLocationCommand

cd : SQL Server PowerShell provider error: Could not connect to 'MyServer\MyDB'. [Failed to connect to server MyServer\MyDB.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]

At line:1 char:155
+ ... MyServer\MyDB'']/Database[@Name=''MyDB'']'|cd}
+ ~~
+ CategoryInfo : OpenError: (SQLSERVER:\SQL...RTING\Databases:SqlPath) [Set-Location], GenericProviderException
+ FullyQualifiedErrorId: ConnectFailed,Microsoft.PowerShell.Commands.SetLocationCommand

cd : SQL Server PowerShell provider error: Could not connect to 'MyServer\MyDB'. [Failed to connect to server MyServer\MyDB.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
At line:1 char:155
+ ... MyServer\MyDB'']/Database[@Name=''MyDB'']'|cd}
+ ~~
+ CategoryInfo : OpenError: (SQLSERVER:\SQL...1\MyDB:SqlPath) [Set-Location], GenericProviderException
+ FullyQualifiedErrorId : ConnectFailed,Microsoft.PowerShell.Commands.SetLocationCommand

sql-server
powershell
asked on Stack Overflow Feb 6, 2017 by ca9163d9 • edited Feb 6, 2017 by marc_s

1 Answer

0

Right-click on SSMS icon and select 'Run as Administrator'. Running SSMS as Administraotr also run Powershell with administrator privileges.

answered on Stack Overflow Nov 19, 2019 by Nichollas Correa

User contributions licensed under CC BY-SA 3.0