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.SetLocationCommandcd : 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.SetLocationCommandcd : 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
MyServer
and the DB nameMyDB
? – sodawillow