Cannot import data from Access to MS SQL Server - sql-server

I am trying to migrate a vb.NET project from an MS Access database to MS SQL Server, and have been following a tutorial I found here to do so. I did this, but got a problem where I could read data from the SQL Server database when running my project, but could not insert/edit data using the project.
Any data I tried to manipulate only worked on the Access database, and didn't have any affect on the SQL Server data (I also tried vice-versa, adding data using SQL Server but this couldn't been seen in my project).
So I decided to try again, deleting the Access and SQL Server databases, and using the backup database to import the data from. However, this now is not working, and I'm getting the following error message
Error 0xc020801c: Source - ~TMPCLP123581 1: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
(SQL Server Import and Export Wizard)
Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)
Does anybody know a fix for this? Or why I can no longer import data into SQL Server? (The image below shows the result of what processes were/weren't carried out)

I've fixed the issue now, guys.
I migrated it over using Microsoft SQL Server Migration Assistant for Access, and then changed the connection path and settings in my .ini file.
Then I created a new connection string, using string variables for each of the settings in the .ini file, and this replaced the initial Access database connection string.

Related

SSIS error while running package using SQL job

I have SSIS package that import data from excel to SQL database 2012. the package runs fine and deliver what it supposed to do when I run it on visual studio. However when I try SQL job to run the package it keep giving me error massage below.
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error
code: 0x80004005. An OLE DB record is available. Source: "Microsoft
Access Database Engine" Hresult: 0x80004005 Description:
"'Q:\Ledger\MajorGL.xlsx' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on
which the file resides.".
and the path is a valid path.
Make sure:
Machine were SQL Server is installed has access to path: Q:\Ledger\
User on which SSIS is running has access rights to the file MajorGL.xlsx
#zazzu-I think ,this is a password error with connection.Can u check with connections once again??
Just save the package and close the solution.Again open the solution and the package .Test the connections now.
Drive Q sounds like a network drive, you will need to change your SQL job to run with a user that has permissions to that location.
Go to the section called USING PROXIES in this article and set up your package to use execute using this proxy.

Unable to create a new data source to SQL Server through ODBC

I'm new to SQL Server. I'm trying to create a new data source through ODBC Data Source Administrator for accessing a SQL Server database file (.mdf).
I first experienced an error msg
[TCP/IP Sockets]Specified SQL server not found
when running SQL Server ODBC Data Source Test.
After following all the steps in http://www.ceus-now.com/how-to-connect-to-ms-sql-express/, the previous error msg disappears and the tests are successful.
The connection seems to be successful. But then I experienced another problem is that, I could not choose the database. According to https://www.mssqltips.com/sqlservertip/1471/sql-server-dsn-and-odbc-configuration/ .
The problem might be "If using Windows security, you as the DSN creator, do not have rights to the database". Could someone help me solve this problem please? I really appreciate it! Thank you in advance!
I'm using Windows NT authentication. I'm using SQL Server 2014 (v12.0.2000). SQL Server connect to WORKSTATIONNAME/SQLEXPRESS.

SSIS Package Does Not Execute In SQL Server 2014 ProtectionLevel: EncryptSensitiveWIthUserKey

My boss wants me to figure out a problem we are facing. The problem is that we have a SSIS Project we built using Microsoft SQL Server data tools and are trying to execute that package on SQL Server 2014 Management studio.
It is listed under the SQL Server Agent as a Job and when we execute the job, we get an error: Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E4D Description: "Login failed for user '********'."
In our SSIS properties under security, our protection level is "EncryptSensitiveWithUserKey". I've done a ton of research and it shows to either change that property to "Don'tSaveSensitive", which we need to save the password, or creating a user proxy to serve as a median across the platforms.
We are able to execute the project on the SQL Server Data Tools interface, but not when uploading the Job onto SQL Server 2014 Management Studio. We believe it's because the login is failing as stated in the error above.
How would I go about connecting the two platforms together? Would a user proxy work for this case?
I am still new to this, so please correct any errors I have above kindly.
When you use encrypt with user key that means that when the developer on the current machine, using the current login info, SSIS will decrypt everything when the package is opened by the developer on the same machine. To use the package on another machine you should use another setting such as EncryptSensitiveWithPassword.

Excel to SQL Server - server error

I have a problem. I am trying to local export from excel to .mdf (SQL Server), and I keep getting this error:
[DBNETLIB][ConnectionOpen (Connect()).] SQL Server does not exist or access denied.
I searched different articles, and I tried everything. I installed again my SQL Server, but it still doesn't work. I checked Configuration Manager, but everything looks fine. Does anyane have any idea what else can cause it?
The error explains that you did not specify the right database name, or the right ODBC name, or if you did you did not specify the right user/pwd combination to get access. You would need to get into those details to find the solution.
Did you try to import Excel from MS-SQLserver, which requires no configuration, and has no authorisation limiations (unless hte excel file is encrypted)?

Importing a .cvs file into a detached .mdf?

I was asked to repost this question, due to the answers were not going the right directions.
I have a detached database similar to to Northwind.MDF I want to import a .CVS file into this MDF file. I have the mdf file as part of my Solution Explorer in vs2010 and I can look work with the data, just no way to import. In vs2010 I can use the Server Explorer and connect with no problems. the connection string looks like this:
Data Source=.\SQLEXPRESS;AttachDbFilename=D:\ASPX\sdb1\customer.mdf;Integrated Security=True;User Instance=True
When I try to use any tool outside of vs2010 I cannot connect. Non of the sqlserver tools connect and give me an access denied, even when I try to attach the file from within Management Studio.
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'STEPHANS-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Unable to open the physical file "D:\ASPX\sdb1\customer.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)
This should not be this tuff to import data from a CSV.
You have to connect to your user instance database using an special connection string.
An user instance database is a sql express database based upon an mdf file (just what you have).
This link explains how to connect from SSMS to your User Instance Database:
How to: Connect to a User Instance

Resources