Link to home
Start Free TrialLog in
Avatar of Steve Williams
Steve WilliamsFlag for United States of America

asked on

Why do I get the message "Message has been thrown by target of an invocation"?

I have a Windows 10 Pro workstation which is on a local domain and connected to various servers.  I use VS2015(Microsoft Visual Studio Community 2015) for developing in-house windows form applications for various departments. I noticed today that when I use the SQL SOE (SQL Server Object Explorer) when I have a solution or project open it does not function and errors out. If I open VS 2015 and then use the SQL SOE, it works fine.

The following is a screenshot of what it looks like when it functions correctly.
User generated image
This image is what it looks like when it is not working, it says it is connected but it won't show any data or let you interact with it from the SQL SOE.
User generated image
Funny thing is that when I have a solution open, even though I cannot see the objects from the server, I can still do a successful query! See!
User generated image

But if I open VS2015 open the SQL SOE and start browsing before I open a solution, I can see the server objects. But If I try to use one  I get the following error:

User generated image
Does anyone know how to fix this issue or have had a similar problem? If so how did u fix it?
Avatar of Nakul Vachhrajani
Nakul Vachhrajani
Flag of India image

It looks like some sort of a bug. What Update level are you at (Help -> About Microsoft Visual Studio)? If you are not on Update 3, please upgrade to Update 3 (https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs).
Avatar of Steve Williams

ASKER

Nakul, Thanks for responding. below is a screenshot of the About window.

User generated image
Visual Studio is not really my area but did you check in Event Viewer for any error related to the issue?
Sometimes you can find there more detailed information that can lead you to solve this issue. Like this it really seems to be a bug.
Vitor, Thanks for responding. This happens regardless of project. I can create a new project and get the same result. I thought  at first it was something in my code but realized it has to do with Visual Studio.
I understood that, Steve. I'm just asking if you did check in the Event Viewer for more detailed information about the issue.
Vitor, I apologize. I misunderstood you. Your referring to Windows OS Event Viewer. No, I have not yet. I just opened it and will report anything that I feel is related to the  issue. Thanks!
ok So I looked thru the Event viewer and the only thing that post to the event viewer when try to use the SQL SOE  is the following:

Log Name:      Application
Source:        ESENT
Date:          3/8/2017 10:03:48 AM
Event ID:      103
Task Category: General
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      ENG-WS1.cartermanufacturingcoinc.local
Description:
devenv (6276) f2c7328c-de80-43c0-8d4e-17b7f532dbc1: The database engine stopped the instance (1).
 
Dirty Shutdown: 0
 
Internal Timing Sequence: [1] 0.000, [2] 0.000, [3] 0.000, [4] 0.000, [5] 0.015, [6] 0.000, [7] 0.000, [8] 0.000, [9] 0.000, [10] 0.000, [11] 0.000, [12] 0.000, [13] 0.000, [14] 0.000, [15] 0.000.
Is the SQL Server instance in the same machine as Visual Studio?
If so then you might running in lack of resources (CPU and especially RAM).
No the SQL Server Instance is running on a network server on our local domain. Which is a monster and has more than enough resources to function I think we have assigned 4 cores and 4GB of ram to this.  The Application is the only thing currently running on this server as we have moved most of our enterprise applications over to their own VM's on newer hardware. The tiny amount of data being used by this should not even show a small blip on the resources available for it.
Which is a monster and has more than enough resources to function I think we have assigned 4 cores and 4GB of ram to this.
How's a "monster" can only have 4 cores and 4GB? Mind that nowadays 4GB is almost nothing to a SQL Server instance.
Because  the monster has 32 cores total a128 gb of RAM if I choose to assign them to the VM on this SQL Server is running on. Even with two other big applications running on this VM We did not use half of what was available and did not have any issues. Due to expansion the other applications was reassigned to other hardware.
Also we use Citrix XenCenter for our VMware...FYI
Ok. So the big server is really a VMware server and then you're working with virtual machines. Anyway, 4GB still not enough for SQL Server even I don't think is the issue here unless the SQL Server machine has more applications installed.

I'm focused in this error message: "The database engine stopped the instance (1)."
Can you check the SQL Server error log to see if some related error has been registered in the same period?
Actually Microsoft  recommends only 1 GB for SQL Server Express. I 'd say I have that covered. this is a very small amount of data and doesn't require a full seat of SQL Server.

See Requirements for  SQL here CLICK HERE!
Ok here is the latest error log from that SQL Server Instance.
(see attached file ERRORLOG.txt)
ERRORLOG.txt
That error log is from when the server started up - you might need the log one before that one :)
Here is the last two error reports before the previous one I posted.

ERRORLOG1.txt
ERRORLOG2.txt
This message every hour suggests that there is some snap-shotting of guests going on - but that shouldn't cause the issue you are seeing.

"I/O is frozen on database"

I also see a lot of messages about starting up CalcTools. What is the result of this query?

SELECT is_auto_close_on FROM sys.databases
WHERE name = 'CalcTools'

Other than that - the shutdown doesn't look to have been cause by a SQL Server issue - you might need to look into the eventvwr logs on the guest and possibly look into whether the host has shut down the guest - do you have access to host level logs?
@MattSQL: Thanks for the reply, the result of the query was 1 in a column named "is_auto_close_on"

I think the snapshotting that is going on is the ShadowProtect Backup software we use for doing snapshots of all our servers once an hour.

when you are referring to guest are you speaking of the workstation or the server?

I have full access to anything on the host or client.
ASKER CERTIFIED SOLUTION
Avatar of Matt Bowler
Matt Bowler
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MattSQL, you get the points. I changed the AUTO_CLOSE Setting to false and that solved the issue. I want to thank all who contributed. Not only did we find a solution, I also learned a lot about the differences in SQL Express and SQL Standard. Thanks for your time fella's, it is greatly appreciated
Thanks Steve, glad you got it sorted :)