Linked tables in SQL server 2008 express - ms-access

I am migrating an ACCESS 2000 to SQL express 2008 and am having trouble with the linked tables. Is there a way to replicate the ACCESS linked tables to SQL?
Thank you

You can use the upsizing wizard or the Microsoft SQL Server Migration Assistant 2008 for Access. Once you have the tables on your SQL server you can then link them using either the normal table linking method or through code if you want to be fancy
EDIT:
If they are on the same physical box then one way is to make views of the table using the full 3 name. In the below example I’m creating a view in the database Tracker_3 that is looking at the table tblStaff_details in the database Skyline_common
USE [Tracker_3]
GO
create view [dbo].[tblStaff_details]
as
select * from Skyline_common.dbo.[tblStaff_details]
GO

What I want to do is link a database from SQL express (Database db1, Table tbl1) to SQL express (Database db2, Table tbl2)... How can I do this?
Uh, if db1 and db2 are the names of the databases on the same server, it is quite easy to query between different databases.
select *
from db1.dbo.tbl1 inner join db2.dbo.tbl2
on tbl1.employeeid = tbl2.managerid
Hope that helps.

Related

Join queries from two different databases on the different server

Can i use mySql and SQL Server DB combine, I have a stored procedure in sql server DB and i like to add another table to that procedure but that table is in mySql DB on a different server, is there some way to use two different DBs like this.
Please help. Thanks in advance.
You have to create a Linked Server in MSSQL, pointing to your MySQL server. In order to do that, you can follow the tutorial here.

How can i export MS SQL into MySql table?

How can i export large tables from MS SQL into MySql table. Please note that the tables a large and.
I tried the mysql migration toolkit that is in MySql Workbench but i could not establish connectons to the SQL server
Please advise me on the best way to do this?
Thanks :)
One method of doing it (if it really is a lot of data and a lot of tables): creating a linked server in SQL Server and using it to push data into MySQL.
This article gives step-by-step instructions to create the linked server.
ANd then just run queries against your tables like so:
INSERT INTO OPENQUERY (<LINKED SERVER>, 'SELECT * FROM MySQL_Table')
SELECT * FROM dbo.SQL_Table

How can I insert data from SQL Server to SQL Azure?

I would like to write a query with data based on a SQL Server table and insert the results into a SQL Azure table. Is this possible in SQL Server Management Studio?
For example:
SELECT stuff
INTO AzureTable
FROM SqlServerTable
I suppose it's possible to do something similar to that with a linked server to your SQL Azure host, but using SELECT INTO explicitly will not work - you'd need the destination table to exist first (see this MSDN blog post where they describe why SELECT INTO is not supported in SQL Azure).
If the destination tables don't already exist, you can script the objects in Management Studio (as described here) or use tools like SQL Compare from Red Gate to do the grunt work for you.
Once the destination tables exist, you can just write insert statements (again assuming a linked server) or you could use a slightly different approach. For example, have you looked at the SQL Azure Migration Wizard on Codeplex or SQL Data Compare from Red Gate?

How can I export these Sql Server 2008 Tables from SqlServer A to SqlServer B?

I'm trying to export some tables from a sql database on SqlServer 1. In our intranet LAN (right next to me) is a temp Sql Server I made, called SqlServer 2.
I don't want to backup the entire db and then restore that : source DB is around 30Gig.
So I try and do an EXPORT task. But some of the tables have some GEOGRAPHY fields. So the Export Task isn't working. Is there any other way?
if you have administrator rights on SQLServer1, you could create a linked server object on SQLServer1 that points to SQLServer2. With that relationship, you can use a four-part name to reference the tables on SQLServer2 and write an INSERT statement to push the data over.
Check out Books Online for how to set up a linked server.

MS-Access Add Additional Linked Tables

I have an MS-Access database that was converted to use SQL Tables using the "Microsoft SQL Server Migration Assistant 2008 for Access" (aka SSMA) and created linked tables (so the MS-Access interface still works but is linked to SQL Tables).
Modifying those tables has been no problem (modify in SQL, use the Linked Table Manager in MS-Access, update tables). But I've not added a new table in SQL and I can't find a way to add that table to the set of linked tables.
I've tried the External Data -> ODBC Database, but it wants me to make a FileDSN and since the SSMA tool didn't require that I don't want to have some tables linked one way and other files liked another way (does anyone know how SSMA links the tables?).
So my underlying question is: Without using DSN how do I add an additional SQL Server table to MS-Access as a linked table?