Wednesday, March 28, 2012

mapping

hi! i have two different databases (SQL 2005 and Oracle) and i need to map their tables with one another. how will i do this?

thanks

Hi,

you can create a Linked server with Oracle. and query the oracle table as local tables. or you can use OpenRowset to query oracle database

|||

ahm, I'm just new at using oracle and i'm a little bit confused.. could you please explain a little more?

thanks!

|||If you create a linked server for you Oracle Server in SQL Server (See the Books online for SQL Server for detailed information) you can access the tables of the Oracle instance using the four part notation of SQL Server:

SELECT * FROM OracleLinkedServerName..Schema.ObjectName

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

However, I found that in order to get it to work, I needed to use brackets around each element such as the following: SELECT * FROM [LINKEDSERVERNAME]..[DATABASENAME].[TABLENAME]. I wouldn't have found it out had I not used the "Script table as..." command by right-clicking the table in the Object Explorer! This wasn't mentioned in BOL.

Brian J. Matuschak

|||

Actually there is no need to use the brackets unless you have special characters in the names.

No comments:

Post a Comment