linked-server

Is it possible to copy the data in a remote MSSQL table to a local Table?

萝らか妹 提交于 2020-01-06 16:41:13
问题 What is the best way to go about doing this? I have found some INSERT statements, but they all seem to work just for inner-database copying. My rendition: INSERT INTO [PROGRAM003].[dbo].[faq] ([id], [category], [question], [answer], [tags]) SELECT ([id], [category], [question], [answer], [tags]) FROM [SQL2005_552664_gsow].[dbo].[faq] I am not very fluent with MSSQL yet, so any and all help is appreciated. 回答1: You can use OPENDATASOURCE or OPENROWSET to access tables on other servers. You'll

Create linked server in management studio to SAGE 50 US database using ODBC Data source administrator

假装没事ソ 提交于 2020-01-06 05:40:29
问题 I am trying to create a linked server to SAGE 50 using server in management studio but keep getting an error. I am hoping that someone has done this before and can provide some guidance.I set up and tested "ODBC data source administrator (64bit)" with as seen below and it works for Microsoft access when I used "External data - ODBC database" connection. I then added a linked server with the security tab set up like so using the same credentials that I used to add it to Access like so: And set

How do I configure an Excel file as a Linked Server in SQL Server?

主宰稳场 提交于 2020-01-04 17:52:53
问题 I have opened the Linked Server dialog to create a Linked Server so that I can import my excel file data to a SQL Server 2005 database. Which provider must I use and what other settings do I need to fill in? 回答1: You would set it up using either OLEDB provider or the provider for ODBC drivers and create a connection using the ODBC Administrator tool on the server to the Excel file. Are you planning to read from this Excel file on a regular basis? If not, then setting it up as a Linked Server

How do I configure an Excel file as a Linked Server in SQL Server?

為{幸葍}努か 提交于 2020-01-04 17:51:12
问题 I have opened the Linked Server dialog to create a Linked Server so that I can import my excel file data to a SQL Server 2005 database. Which provider must I use and what other settings do I need to fill in? 回答1: You would set it up using either OLEDB provider or the provider for ODBC drivers and create a connection using the ODBC Administrator tool on the server to the Excel file. Are you planning to read from this Excel file on a regular basis? If not, then setting it up as a Linked Server

Is there a way to prevent SQL Server from Validating the SQL in a stored procedure during CREATE / ALTER

孤者浪人 提交于 2020-01-03 10:45:16
问题 One aspect of our system requires our SQL Server instance to talk to a MySQL Server via a linked Server Connection. MSSQL -> LinkedServer(MSDASQL ODBC Provider) -> MySQL ODBC Connector -> MySQL DB The Table on the linked server is called in a SPROC along the lines of CREATE PROCEDURE DoStuff AS SELECT a.ID, a.Name, b.OtherProperty FROM MyDatabase..MyTable a JOIN LINKSRVR...OtherTable b ON a.ID = b.ID GO The problem is that the MySQL database lives on another network, only accessible by VPN &

What are the drawbacks of using linked servers in SQL Server?

杀马特。学长 韩版系。学妹 提交于 2020-01-03 07:17:07
问题 Are there any huge performance issues or security concerns? Using SQL Server 2005 and higher 回答1: Server migrations are more convoluted Security can be tricky to set up for multi-hop Non-SQL Server ones requires a local driver installed (Sybase, DB2 etc) Clusters, off-site DR: registry entries + drivers Non-SQL Server x64 woes. 'Nuff said Non-SQL Server ones don't play well (how many places to enter the password?) Performance (in other answers) I've set up linked servers to Access, DB2,

Retrieve >901 rows from SQL Server 2008 linked server to Active Directory

萝らか妹 提交于 2019-12-30 03:21:06
问题 In SQL Server 2008 (version 10.0.4000) I have created a linked server to an Active Directory server. This query: select TOP 901 * from openquery(adsisca, ' select givenName, sn, sAMAccountName from ''LDAP://10.1.2.3:389'' where objectCategory = ''Person'' and objectClass = ''InetOrgPerson'' ') works. However changing the query and trying to retrieve 902 rows does not : select TOP 902 * from openquery(adsisca, ' select givenName, sn, sAMAccountName from ''LDAP://10.1.2.3:389'' where

Create View using Linked Server db in SQL Server

谁说胖子不能爱 提交于 2019-12-30 02:56:08
问题 How can I create View on Linked Server db. For Example I have a linked server [1.2.3.4] on [5.6.7.8]. Both db servers are SQL Sserver 2005. I want to create View on [5.6.7.8] using table on linked server. EDIT: On creating using full name, [1.2.3.4].db.dbo.table, I am getting this error. SQL Execution Error. Executed SQL statement: SELECT * FROM 1.2.3.4.db.dbo.table (YOu can see brackets are not there.) Error Source: .Net SqlClient Data Provider Error Message: Incorrect syntax near '0.0'. ---

Insert Data From One Server To Another?

前提是你 提交于 2019-12-29 06:23:10
问题 If I want to run this sort of query in SQL Server, how can I do the same query from one server I am connected to to another? I tried adding "[ServerName1]." before "[DatabaseName1].[dbo]..." and "[ServerName2]." before "[DatabaseName2].[dbo]..." but that didn't seem to work. INSERT INTO [DatabaseName1].[dbo].[TableName] ([FieldName]) SELECT [FieldName] FROM [DatabaseName2].[dbo].[TableName] Is this possible? 回答1: Yes you would use the server-name before the whole rest of object-name like:

sql linked server join query

十年热恋 提交于 2019-12-28 16:12:14
问题 I am having issues running any query on joining a local DB with a DB from a linked server. My query: SELECT [LocalDatabase].[dbo].[Record].[Project_ID], [LinkedServer].[Reporting].[dbo].[Active].[Name] FROM [LocalDatabase].[dbo].[Record] inner join [LinkedServer].[Reporting].[dbo].[Active] ON [LocalDatabase].[dbo].[Record].[Project_ID] = [LinkedServer].[Reporting].[dbo].[Active].[Delivery_Number] The errors: Msg 4104, Level 16, State 1, Line 9 The multi-part identifier "LinkedServer.Reporting