SSMS 2012 crashes with mssqllocaldb table edit top 200 rows - ssms-2012

SQL Server Management Studio 2012
mssqllocaldb database
When I right click on a table and select Edit Top 200 Rows I get this error:
TITLE: Microsoft SQL Server Management Studio
Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)
SSMS then crashes.
It works just fine with databases attached to my SQLEXPRESS instance.

Related

SSIS ODBC pulls data properly until the package is executed - then it fails

I have an old database system of which I need to use Visual Studio to pull data into SQL.
This is what I have:
Windows Server 2012 R2
SQL 2012
Visual Studio 2010
On this server I have an ODBC data source with a special driver that points to the old database. It works, I have used it for years with other applications.
In Visual Studio, this is what I did.
Created an SSIS project
Created a new Connection in Connection Manager (lets called it “A”) using the ODBC Data Source.
Created a second Connection (let’s call it “B”) to the SQL 2012
In the Data Flow tab, I dropped in an ODBC Source, which I configured to use the “A”. The table shows up, proving that the ODBC Source is working. I chose a table then Preview – the top 200 rows appeared. So far so good.
In the data flow tab, I dropped in an OLE DB Destination, Which I configured to use “B”. I choose a table, then mapped the 2 together.
Now the problem. When I executed it, it failed with this: “SSIS.Pipeline: ODBC Source failed validation and returned error code 0x80004005.”
Why would the validation fail for ODBC when it properly pulled data?
How do I fix this?
I saw one article that I needed to add the path to the ODBC driver into the Windows path statement. I did that, but it did not help.
On a side note, I have Victual Studio 2019 on my personal computer. When I follow the exact same steps, it executes perfectly. The problem there is, SQL 2012 is too old to be published to, from VS 2019.

SSRS Data Source Network-related error from Report Server but VS works

I have a report that is connecting to a new server.
When I run the report in Visual Studio, it runs fine but when I deploy the report, the new data source is getting an error:
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: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The Type is MS SQL Server and the Connection String is basic (Data Source=;Initial Catalog=). When I hit Test, it takes about a minute to come up with the error. I also get the error whether using stored credentials or Windows Integrated.
I have recreated the data source by hand without any difference.
I have went through the Microsoft troubleshooting without success. I have numerous other similar data sources but have never had this issue.
MS Docs: Troubleshoot connecting to the SQL Server Database Engine
Don't know what else to try. Any suggestions to fix this?
SSRS 2015 - SQL Server 13.0.5820.21

SQL Server 2012 - Cannot create an instance of OLE DB provider "Microsoft.Jet.OLEDB.4.0" (Microsoft SQL Server, Error: 7302)

I just installed SQL Server 2012 to test differences and make sure it is ok for my Work. I may not be a pro at SQL, but I don't see how to add a Link to Jet database on my server. I have imported Jet Databases, but when going thru the GUI to Link a JET Database I see no Provider for JET. I am running Access 2003 (I don't like the 2008+ GUI)
I searched an found nothing simular to my issue; at least nothing I understood. Nothing mentioned how to add Jet db Provider.
I ran a connection string to the Jet Database thru QA:
sp_addlinkedserver 'USGEScrub', 'Access', 'Microsoft.Jet.OLEDB.4.0',
'D:\Lead$\SupList\USGEScrub.mdb'
The connection string works till I try to access the data and then I get this the errorand of course if I click the links nothing shows up:
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.
Cannot create an instance of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked
server "USGEScrub". (Microsoft SQL Server, Error: 7302)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=7302&LinkId=20476
download the 2010 Access database engine from Microsoft
Allow "InProcess"
Add linked server using the ACE OLEDB provider.
more details here
I had a similar problem and in my case it turned out to be related to the permissions on the %TEMP% folder for the account under which the SQL Server service was running. For more details see my answer here.
Sometimes this problems occurs in computers x64 with office x84 versions installed. Try this:
Install pasive OleDb Driver x64

SSIS MySQL Copying Table to SQL Server

I want to copy tables from MySQL to SQL Server.
ADO.NET source using the MySQL connection.
OLE DB destination, SQL Server.
The statement is a full copy so no big deal there. When I hit the play button, after a while an error pops up. I set a DataViewer and started all over again, running it from inside the DataFlow while checking the DataViewer. After a while (this time it took longer) the error.
Error: 0xC02090F5 at Data Flow Task, ADO NET Source 1: The component
"ADO NET Source" (1) was unable to process the data. Fatal error
encountered during data read.
Error: 0xC0047038 at Data Flow Task,
SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on component "ADO NET Source" (1) returned error
code 0xC02090F5. The component returned a failure code when the
pipeline engine called PrimeOutput(). The meaning of the failure code
is defined by the component, but the error is fatal and the pipeline
stopped executing. There may be error messages posted before this
with more information about the failure.
Any idea on this error?
this took me few days to figure out...so I thought I would share my notes
How to connect and load data from MySQL to SQL Server
1 - Download the 32 bit ODBC driver.
go to the MySQL website and download: “mysql-connector-odbc-5.2.4-ansi-win32.msi” NOTE: Do not use the 64 bit driver on BIDS 2008. BIDS 2008 is 32 bit. You will get a mismatch error when creating SSIS’s connection manager: “The specified DSN contains an architecture mismatch between the Driver and Application”
2 - Create a User DSN You need to open the using windows 32 ODBC admin tool. DO NOT open the regular ODBC admin, in control panel. Open the ODBC admin located here: c:\Windows\SysWOW64\odbcad32.exe. If you use the default ODBC admin…it will not work. Additionally you must create a “User DSN” - NOT a System DSN. Otherwise it will not show up in SSIS NOTE: the screens look the same so you will have no way of knowing whether you are in 32 BIT ODBC Admin tool or not.
3 – Create a new SSIS package and create an ADO.NET connection manager AND ADO.NET SQL Server destination.
4 – Change the Source ADO.NET properties. You will get validation errors and your package will not run. You need to change the “ValidateExternalMetadata” to FALSE (in the “Advanced Editor” dialog box) of the ADO.NET source It will also give you metadata error…that’s ok…just click ok. It will still pull the metadata (column names/data types). You cannot select the tables as you would in SQL server. You need to type the SQL select statement.
5 - Run the package and should run and load normally.

Collating Sequence Not supported by operating system

I am moving from SQL 2000 to SQL 2008. The SQL 2000 is on a Server 2003. SQL 2008 is on a Server 2008. I have imported my database successfully. I am able to perform queries and they work fine. I use a VB6 program running in the IDE to update the database.
When my VB6 program runs on a server 2003 the program will connect using the following connection string:
Provider=SQLOLEDB;DATABASE=mydbname;SERVER=my ip;DRIVER={SQL SERVER};UID=myuser;PWD=mypw;
Using the above connection string, I can connect with no errors to either SQL 2000 or the new SQL 2008 database. On the Server 2008, there is no SQLOLEDB driver show, so I have to use the new SQLNCLI10 provider
CCTdbConnectionString = "Provider=SQLNCLI10;Server=myServer\My InstanceName;Database=MyDB;UID=myuser;PWD=mypw;
Here's the problem. When I am running on the Server 2008 I get the error 3228 Selected collating sequence not supported by the operating system. If I hit debug and try again, or stop the program and try again it gets past that error until I reopen the IDE. Then I get a 2nd error encountered is an error 3027 Can Not Update. Database or object is read-only! This never goes away and I'm dead.
After Much research, I have found the answer. SQL 2005 and up apparently require a Unique Key Index exist on every single table that is accessed using ODBC or OLEDB.
This Cures the problem.
Compile the code: don't use the IDE?
Related KS KB article 246167