Visual Studio 2013 Test Explorer - Discover Tests Failed to initialize data storage for staging test results - visual-studio-2013

I constantly get the following error when opening the test explorer in VS2013:
Failed to initialize data storage for staging test results as it threw the following exception:
'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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
In the EventViewer I see the following entry:
Source: SQLLocalDB 12.0
Message: Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error}
The application was unable to start correctly (0x%lx). Click OK to close the application.
Reported at line: 3728.
Does anybody have the same problem and know how to get rid of this error?
Best regards
Yannik

Finally, I found a solution that worked in my case.
Delete the instance folder of local db called "v11.0" (C:\Users\theUser\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0)
Start cmd window and execute the following command: sqllocaldb create "v11.0"
After this, the problems within the test explorer were solved.

Yannik had the solution....local DB (v17) is now called MSSQLLocalDB.
Delete "MSSQLLocalDB"
(C:\Users\theUser\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB)
Create a new one.
sqllocaldb create "MSSQLLocalDB"

Related

Oracle Sql developer throwing error message : Internal Error: Fetch error message failed! Vendor code 17001

I have recently moved from TCP to TCPS Connection. I can confirm that all my connection parameters are right and properly set. tnsnames.ora and sqlnet.ora is under oracle_home/network/admin folder.
I am trying to connect and getting below error message:
An error was encountered performing the requested operation:
Internal Error: Fetch error message failed!
Vendor code 17001
Looking for suggestions to fix issue.
Make sure that the Oracle Client "bin" directory (e.g. $ORACLE_HOME/bin) is in your PATH environment variable.

How to catch Sqlcmd errors without showing the error message

I am trying to find out with SQLEXPRESS is installed on a server by running the following
sqlcmd -S LT1183 -U uname -P pass123 -Q "SELECT ##servername"
If it is installed it gives out the server name but if its not, it throws the below error.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : TCP Provider: Error code 0x2AF9.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
I am looking for a way to suppress this error and instead show a custom error message. Is that possible?
Thanks in advance.
This may not be possible with sqlcmd, since the error stems from connecting the the server, which upon error immediately terminates the sqlcmd.
if you can use powershell, you may find some luck using invoke-sqlcmd.
Powershell Try Catch invoke-sqlcmd

Oracle 11g Enterprise Manager Login Fail Internal Error has Occured

I have installed Oracle 11g on my Windows 10 machine. I followed all preinstallation requirements.
When trying to log in to the Enterprise manager via this link:
https://localhost:1158/em
I get the error:
Internal Error has occurred. Check the log file for details.
I have found log files and it looks like this is the relevant entry:
2017-09-17 07:36:53,631 [MetricCollector:HOMETAB_THREAD600:60] ERROR rt.DbMetricCollectorTarget _getAllData.344 - java.lang.NullPointerException
java.lang.NullPointerException
at oracle.sysman.emSDK.emd.comm.EMDClient.getURL(EMDClient.java:1570)
at oracle.sysman.emSDK.emd.comm.EMDClient.getConnection(EMDClient.java:1266)
at oracle.sysman.emSDK.emd.comm.EMDClient.getConnection(EMDClient.java:1242)
at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1689)
at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:981)
at oracle.sysman.emo.perf.metric.rt.DbHomeTab._getAllData(DbHomeTab.java:340)
at oracle.sysman.emo.perf.metric.rt.DbHomeTab.getData(DbHomeTab.java:154)
at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:416)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:605)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:325)
at java.lang.Thread.run(Thread.java:595)
I have tried to set the unique name in environment variables, I thought maybe Java was the problem so I updated my JDK to 8. I am still getting the same error, and my SQL Plus will not open, as soon as I put in the correct credentials it closes. Also I have configured a Listener and tested, test was successful.
I managed to fix the issue, turns out it was a time zone issue. The DB time zone and computer time zone were different. Thus the DB Console would not start and was giving the error "EM daemon is not running".
I fixed it by following instructions here.
Also note before I did that I completely uninstalled Oracle and reinstalled it. There were some issues on that install that were causing SQL not to run. But the above is what fixed the Internal Error I was getting.
Make sure the SYSMAN database user is not locked.
select username, account_status from dba_users where username = 'SYSMAN';
If the account status is not OPEN then
alter user SYSMAN account unlock;
Try restarting dbconsole
$ emctl stop dbconsole
$ emctl start dbconsole

Can't start teamcity server due to Unexpected excetion SQLException/HsqlException

I can't start my Teamcity server on my local machine. It is giving Teamcity server startup error.
The error is : Unexpected exception SQLException/HsqlException: SQL error when doing: Taking a connection from the data source
SQL exception: error in script file line: C:\ProgramData\JetBrains\TeamCity\system\buildserver 45
Anyone have any idea?
Thank you in advance.
Most probably the error means that HSQL DB is corrupted. The solution is to restore from backup.

Debugging In SQLDeveloper over SSH Tunnel

I am using SQL Developer over an SSH tunnel to my database server without any problems. However, it fails when I try to use the debugger. The debugging window shows:
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.72.227.252', '52413' )
But then I get the errors:
ORA-30683: failure establishing connection to debugger
ORA-12535: TNS:operation timed out
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Is there a special listener that has to be running on the database server in order to debug over the network? It looks like the CONNECT_TCP call is trying to connect to a different port (52413 in the above example) every time I run it. How do I debug in SQL Developer over an SSH tunnel?
The oerr command shows this for the ORA-30683 error:
ORA-30683: failure establishing connection to debugger
Cause: An error was indicated when trying to establish a connection to a debugger. Usually a TNS error will display along with this message to further explain the problem, although this TNS error will likely be hidden if you choose to trap the error. In your case you also get the ORA-12535 operation timed out error.
Action: Correct the indicated parameter value and try again.
For details check here
Run
Solution
SQL> grant debug connect session, debug any procedure to
Well experienced same problem, try these solutions:
1- Grant debug connect session to urUser;
Grant Debug any procedure to urUser;
2 - Tools -> preferences -> debugger and mark ask host for debugging...
3- when you compile be sure to give the ip adress with which ur machine on where sql developper is running, if it still doesnt work, try to turn off the firewall and retest it.
Temporary solution: switch debugger from jdwp to old version.
Add at the end of the ide.properties:
DatabaseDebuggerDisableJDWP=true
This file location:
C:\Users\username\AppData\Roaming\SQL Developer\system${VERSION}\o.sqldeveloper.${SYSTEM_VERSION}

Resources