Move MS Access tables to be used in SQL Server - sql-server

I'm using MS Access 2013. I have a some tables which I would like to migrate to SQL Server 2012 (Management Studio). I want these tables to be used in SQL Server for addition etc., but I also want these tables to show as 'linked' in MS Access.
How do I make it so the tables look populated in MS Access, but are manipulated from SQL Server?
The Migration tool in SQL Server did not give me my desired results.

I'm not sure why you want to move it to SQL server from Access. If you say it is just for addition purposes, that is a really bad idea to move from Access.
You will need to create a shell database in SQL Server.
From Access select > External Data > More > ODBC Database and follow the prompts to export the data into SQL Server.
After that select > External Data under Import and Link > ODBC Database
This will link the local Access table to the SQL Server table and you will be able to run queries you require.

Create Database in SQL Server https://msdn.microsoft.com/en-us/library/ms186312.aspx#SSMSProcedure
Migrate Data from Access to SQL Server. For Access 2013 you will need to use the SQL Server Import and Export Wizard. Search the start menu for "Import and Export Wizard". It comes installed with SQL Server. For the data source choose Microsoft Access and follow the steps.
How do I make it so the tables look populated in MS Access, but are manipulated from SQL Server? Create a linked table via ODBC connection. https://support.office.com/en-us/article/Import-or-link-to-SQL-Server-data-a5a3b4eb-57b9-45a0-b732-77bc6089b84e

Related

How to copy table from SQL Linked Server to SQL Server and maintain key constraints?

I have an SQL Server installed on a local Windows 10 machine - I'm using Microsoft SQL Server Management Studio to interact with it.
I also have a DB2 database hosted on an IBM i machine and I've created a Linked Server in SQL Server Management Studio to represent it. I can connect to the Linked Server and can query/pull data from it successfully.
I'm trying to copy particular tables from the Linked Server and insert them into a Database/Schema in the SQL Server - I can do this successfully but unfortunately, it appears that in the process of copying the table over, none of the constraints (particularly in my case, the key constraints) are maintained.
Is there a simple way to copy over tables from a Linked Server to SQL Server (in SQL Server Management Studio) while maintaining key constraints?
The following query is an example of what I'm using to copy the tables over (one-by-one):
SELECT *
INTO SQLSCHEMA.SQLTABLE
FROM LINKSERVER.LINKDATABASE.LINKSCHEMA.LINKTABLE
The easiest way is to use proper tool for it like SSMA:
Microsoft SQL Server Migration Assistant (SSMA) is a tool designed to automate database migration to SQL Server from Microsoft Access, DB2, MySQL, Oracle, and SAP ASE.
Migrating DB2 Databases to SQL Server (DB2ToSQL)
SQL Server Migration Assistant (SSMA) for DB2 is a comprehensive environment that helps you quickly migrate DB2 databases to SQL Server or Azure SQL DB. By using SSMA for DB2, you can review database objects and data, assess databases for migration, migrate database objects to SQL Server or Azure SQL DB, and then migrate data to SQL Server or Azure SQL DB. Note that you cannot migrate SYS and SYSTEM DB2 schemas.

Selecting data from SQL Server 2005 DB to Azure SQL staging DB table in Azure

I was wondering if this is possible: I want to create 2 tables in an Azure SQL database which I want to use as staging tables for some data selected from a SQL Server 2005 database on an on-premise server.
Is there any good way of doing this?
Update:
Followed the Linked-Server Guide and got this error: I need to add a linked server to a MS Azure SQL Server
The weird thing is i just managed to login to the Azure DB on with Those exact credentials. Am i missing some security configuration somewhere?
You don't necessarily need to create a linked server to move data from an on-premise SQL table to Azure SQL. Tools like SSIS come to mind, where a linked server isn't necessary. Or a tool like SSDT where you could use the Data Compare feature to move data. There is also Azure Data Factory.
Support for linked servers and distributed queries against a SQL Azure Database is a feature available since September 2012 as explained here. On my tests it does not work correctly on SQL 2012 and does not work on SQL Server 2008 R2 and earlier versions. You may need to upgrade to SQL Server 2014 to create a fully functional linked server.
Hope this helps.

Want to have a SQL Server run query against a SQL Anywhere DB on another server

I have a SQL Server 2012 database on one server, and a SQL Anywhere 12 database on another server. I want to schedule a nightly select query that pulls data from the SQL Anywhere DB to the SQL Server DB.
This is all easily done between two SQL Server databases, even on different servers, but I have no option for "Microsoft OLE DB Provider for SQL Anywhere" and everything I find on the subject seems to assume that both the SQL Server and the SQL Anywhere DBMS are on the same server. That is not an option for me.
Is there some way I can get and install just what is needed on the SQL Server system to let me get the SQL Anywhere provider option? Legally and without involving additional licensing?
Microsoft OLE DB Provider for SQL Anywhere is exactly the right one.
This creates the necessary installer:
Start Menu\Programs\SQL Anywhere 16\Administration Tools\Deploy to Windows
Then just install it on the SQL server and you're ready to go.

I can't use a database in SQL Azure

I am trying to use a Database in SQL Azure. I have installed SQL Server 2008. I can Login SQL Azure and can use master Database. But I can't use other Database and I can't see any things in my object explorer. It shows this error:
"USE statement is not supported to switch between databases. Use a new connection to connect to a different Database."
How can I use another database?
You cannot link to another database server from SQL Azure, whether that other database is SQL Server or SQL Azure.
I found the Solution for this problem . I install SQL Server 2008 R2. then every thing is ok...
You can first create only the database before running the whole script to create schemas & Tables.
Then manually change the database to the new DB that was created.
Run the rest of the script. Do not run Use <databasename>

Creating a database from .mdf file in MS Access

I have a .mdf which I need to import into MS Access. I have read that .mdf is a Sql Server format so Access wont recognize it. But is there some way I can get the database created in MS Access. I am using Access 2003 and Sql Server 2005
Why not right click the database in SQL Management Studio, click export and then specify the required parameter?
I just checked. Works in my installation of SQL Server 2008.
You could create a new Access database and import the tables from the mdf file into it. You have not mentioned the version of Access or SQL server so it's difficult to be more specific.
Alternatively, if you have access to an SQL Server, you can export the database as an Access .mdb.

Resources