SSMS crashing when opening SSIS in SQL Job Agent - crash

Using SQL Management Studio 2012,
When opening SQL Job Agent -> Open a job -> Wanting to edit a SQL Integration Services Package -> SSMS crashes and comes with this error message:
TITLE: Microsoft SQL Server Management Studio The type initializer for '<Module>' threw an exception. (SqlManagerUI) ADDITIONAL INFORMATION: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (DTEParseMgd) BUTTONS: OK
And when debugging I get this message:
Unhandled exception at 0x23627995 in Ssms.exe: 0xC0000005: Access violation writing location 0x004640fc.
Could not find anything useful to resolve this issue so here I am...

I had exactly the same problem (on win server 2012 with SQL2012 SP1). Solved by installing SQL server 2012 SP2.
I hope it will be helpful for you too.
DD

Related

I can't connect to my LocalDB (LocalDB)\MSSQLLocalDB [2016]

In my machine was installed several versions of SQL Server 2008,2016,2019, but in my current project I have to work only with 2016. I uninstalled 2019 version (because some times the file .mdf that I use to up to source code was generated on the wrong version [2019] and I couldn't find the reason, so I decided to uninstall 2019) after that I got error to accessing LocalDB.
Firstly the error said something like Parenting to MSSQL15 I don't remember the exact error, but that make me think the DB was still pointing to 2019 so I uninstalled and reinstalled SQL Server 2016 and now I having another error.
In SSMS if I try to connect to (LocalDB)\MSSQLLocalDB I get:
Cannot connect to (LocalDB)\MSSQLLocalDB.
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: 0 - [x89C50118]) (Microsoft SQL Server,
Error: -1983577832)
If I go to CMD to see what I have as servers I get:
C:\Users\rmarchetto>sqllocaldb info MSSQLLocalDB ProjectsV13
But if I try to access specifically MSSQLLocalDB I get:
C:\Users\rmarchetto>sqllocaldb info MSSQLLocalDB Call to
LocalDBFormatMessage failed. Error code returned:
2311389448. Error in LocalDBFormatMessage! Error code returned:
2311389454.
I solved the problem, actually I don't known literally which keys u must delete but, to stop the problem of parenting to another SQL version I needed to go to "Registry Editor" and I deleted every key on :
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SQL Server\UserInstances
After that I was able to connect to my (LocalDB)\MSSQLLocalDB [2016] without further errors =)

Can't attach database to SQL Server 2012 reason not found .log

I am trying to attach the AdventureWorks2012_Data.mdf database file to my SQL Server 2012 database.
I am getting this error:
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'USER-PC'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1322+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2012_log.ldf". Operating system error 2: "2(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
Maybe the message is clear that I don't have the .log file and yes I don't have it. But is it necessary to have it? Or is there is another thing? How can I solve that please?
This is a common error that anyone could encounter when you don't have any *.LDF log file for your database, like the AdventureWorks database. SQL Server complains about the *.LDF log file (typically associated to a database *.MDF file) that is missing.
Execute the following T-SQL query to attach the database considering only the *.MDF file:
USE [master]
GO
CREATE DATABASE [AdventureWorksDW2012] ON
( FILENAME = N'C:\Users\User\Desktop\ARPAD\AdventureWorks2012_Data.mdf' )
FOR ATTACH
GO
or remove the connection to the *.LDF log file (a new *.LDF file will be created for the database) through SQL Server Management Studio as shown in the screenshot below:
UPDATE
You get the error:
The database 'AdventureWorksDW2012' cannot be opened because it is version 706. This server supports version 661 and earlier. A downgrade path is not supported. Could not open new database 'AdventureWorksDW2012'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)
because you're trying to attach a SQL Server 2012 (version 706) database file to SQL Server 2008 istance (version 661). For this reason, you cannot perform this downgrade. Download the AdventureWorks2008 database for your SQL Server 2008 istance instead, or upgrade your SQL Server istance with the latest version.
The version of your SQL Server istance is indeed SQL Server 2008: Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (X64) Apr 22 2011 19:23:43 Copyright (c) Microsoft Corporation Express Edition with Advanced Services (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1).
Download and install SQL Server 2012 Express to solve the problem.
The key is this line (edited for clarity):
Unable to open the physical file
"C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2012_log.ldf".
Operating system error 2:
"2(failed to retrieve text for this error. Reason: 15105)".
(Microsoft SQL Server, Error: 5120)
According to this page, operating system error 2 is "File Not Found". Based on this, I would guess that either, A) the file is not there , or B) the name or path is misspelled.
(I'm too slow the answer above is what I'm talking about)
FYI This answer assumes your using the attach a database dialog.
Make sure you've told sql manager where the ldf file is too. It will fill in an entry for a log even if you aren't attaching the log with the mdf.
You'll see it in the box below the one with the add button. You can just remove the log from the attach if you don't have it. Sql will make a new log and you can move merrily along the way.

Package Microsoft SQL Management Studio Package’ failed to load

Sql Managment Studio stop working, sending me this message:
Package ‘Microsoft SQL Management Studio Package’ failed to load
I follow the solution from this page
http://blog.dotsmart.net/2012/01/04/solution-for-package-microsoft-sql-management-studio-package-failed-to-load/
I delete it HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100 key, just like the page says. Now, ssms.exe it's not starting!!! Not even an error message. The article says that, after restart the machine, the registry will be recreated, but I don't have the registry! What am I missing? Now I don't have error message nor Sql Managment Studio!
I don't know how to help you get back the sql server but for those that haven't deleted "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Sql Server\100\Tools" yet, just rename it to "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Sql Server". You don't have to delete the whole thing. That should work but it doesn't fix it for some. If that is the case, check your .net permission setting s. You might have changed MY_COMPUTER_ZONE code group from full trust to everything. Change it back to full trust. Note that .net permission settings cannot be changed in version 4 and later versions.

Reporting Services Error: rsServerConfigurationError

The company I work for has locally a MS Server 2005, with SQL server 2005. The problem that they are facing is that although they can log in to their platform and do most of the things they want (like importing data into the database, editing etc.) they get the message below when they are trying to get a report:
Reporting Services Error: The Report Server has encountered a configuration error; more details in the log files (rsServerConfigurationError)
In the log file I can't find any error or any change. What should I do?

SQL Management Studio attach database: Cannot open "Add" dialogue

When I press the Add... button in the Attach Databases window I get the following error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The server principal "callisto\dotancohen" is not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.1750&EvtSrc=MSSQLServer&EvtID=916&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
The mention of "current security context" led me to believe that this is a permissions issue. However, when I open SQL Management Studio as Administrator I can in fact open the Add... dialogue but it will not let me browse to the C:\Users\dotancohen directory in which my database .mdf file is stored.
This is with SQL Management Studio 2012 RC0 on Windows 7 32 bit. The database .mdf file that I am interested in opening is a 2012 file and 2008 will not open it (my connect.Open() statement fails with 2008, works with 2012). Thank you.
Note that I am not interested in opening SQL Management Studio as administrator to access the database, but rather I am interested in resolving the issue with the user-opened SQL Management Studio to access the database as a regular user. My C# application running in debug mode can open this database without escalated privileges.
It turns out that this is a known bug with SQL Management Studio 2012, or at least the Beta and RC0 version.
By the way, here is the link to file bugs against Microsoft products. Not all MS products can have bugs filed against them at all times, so if the product that you need to file an issue is unavailable for bugs at the moment, try again in a month or two.
It is some MYSQLSERVER agent issue, I just restarted my VM/Machine and it started working perfectly.