I'm trying to create a linked server to an Access database that resides on a separate machine.
On my PC, I can create a link to the Access db, and view, update, add and delete data. If I create the same linked server on our production Server, I can again view, update, add and delete data. All's well so far.
If I now go back to my own PC (used for developing) I cannot access the linked server on the production machine.
The Access database is stored on a separate PC, so the I'm linking to a remote db. As I said this works fine if I'm sat in front of the PC that the linked server is created on - but not if I use a client PC to connect.
I create the linked server using the following command:
exec sp_addlinkedserver
@server = 'AccLinkedServer',
@provider = 'Microsoft.jet.OLEDB.4.0',
@srvproduct = 'OLE DB Provider for Jet',
@datasrc = '\DatabaseServerAccessDatabase.mdb'
If I run the SQL statement:
SELECT * FROM AccLinkedServer...AnyTableYouLike
I get this error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: The Microsoft Jet database engine cannot open the file '\DatabaseServerAccessDatabase.mdb'. It is already opened exclusively by another user, or you need permission to view its data.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].
I've searched in the MS knowledge base, and this forum and followed all of the advice that was available, but it still won't work.
Anyone got any other advice, before I go totally insane with this.
Hi , On my Desktop i registered Production Server in Enterprise Manager on that Server if i go to SecurityLinked Servers There is another Server is already mapped, when i am trying to see the Tables under that one of the Linked Server i am getting the Error message saying that "Error 17 SQL Server does not exist or access denied"
if i went to Production Server location and if i try to see the tables i am able to see properly, no problems why i am not able to see from my Desk top i am using the sa user while mapping the Production Server on my DESKTOP using (ENTERPRISE MANAGER)
And i check the Client Network Utility in the Alias using Named Pipe only, i changed to TCP/IP still same problem What might the Problem how can i see the Tables in Linked Server from my DESKTOP
I wanted to know whether it is possible to query a database in AS400 server from MS SQL Server 7.0 using linked server. If it is possible, could you show some pointers as to how it can/should be implemented. Thanks in Advance. Manojkumar DMT Team DaimlerChrysler Capital Services Phone - 203-845-7326 EMail - manoj.kumar@dcxcapital.com
When creating a table I want to be able to specify not only the db to create it on but also which server to create it on. I have two servers that are linked together, I can view all data without issue.
Doing further research it looks like with the create table command you can tell it the new table name and the database but you can't tell it which server to use. Is there a way of doing this?
Example :
CREATE TABLE LAPTOP.database.dbo.tableName (a INT) gives the following error:
The object name 'LAPTOP.database.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
I am new to linked servers so basically my question is, how do you point to a server within sql before I execute the create table command?
I have a Merge Replication Setup. With 3 computers. One computer acts has a central publisher. The 2nd one is a subscriber, and republishes its data to the 3rd computer. Every thing is being done using Windows Authentication method. the 1st PC has SQL SERVER 2000 (Enterprise Manager, the works). The other two are SQL Server MSDE (Rel. A). My process is up and running and works, but heres my issue.
I need to script the replication installation process out., For future installations on machines that will be located in remote parts of the world. The will reside on a secure DSL network.
Anyone familiar with Scripting Merge Replication knows that once you've run certain scripts/procedures on your subscriber, you have to run a final procedure on the publisher to activate or initiate the subscriber as a valid one, and the you can start the Merge Agent on the subscriber, and voila! you're good. The procdure you run is called sp_addmergesubscription . It goes something like this :
My intention was to embed this system in a stored proc on the publisher and then call it remotely from the subscriber, before starting the Agent. IT FAILS!!! This is my proc:
Create Procedure RunSp_AM_subscription(@servername Varchar(30), @IAdbname Varchar(20), @Attachedbname Varchar(20)) AS
DECLARE @publicationname Varchar(30) SET @publicationname = 'REPUBLISH-'+@IAdbname+''
When I call it locally ot works fine, but not otherwise........... :eek:
When I try to create a linked server SQL Server seems to think that one already exists (because Replication has already created the said server as a remote server). I think the fact that I am not using SQL Authentication might be a problem too.
Does anyone have any ideas? I mean seriously, any suggestions on what to do. This is qute Urgent..............
I would like to create a linked server from SQL Server to Sybase IQ. I have created linked servers before so I know how to do that. However, I dont know the specifics of creating a linked server to Sybase IQ.
What are the parameters that are necessary to link IQ to SQL Server. Which Provider do I use? Do I need to install a special driver?
Hii have created a new database and a new linked server that points to anAccessDB using an ODBC DSN.Now inside that new sql db i have create i need to created a new view soi open EM went to views and paste the followingselect * from openquery (AccessLinkedServer,'select * from mytable')i press run and i see the data ok .but when i try to save the view i getthe followingODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operationcould not be performed because the OLE DB provider 'MSDASQL' was unableto begin a distributed transaction.[Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returnedmessage: [DataDirect][ODBC dBase driver]Optional feature notimplemented.][Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace[OLE/DB Provider 'MSDASQL' ITransactionJoi JoinTransaction returned0x8004d00a].*** Sent via Developersdex http://www.developersdex.com ***
I am trying to create the linked server to IBM DB2 server, and getting the following error message. Can some one take a look at this and let me know. Thanks!
TCP Provider: No connection could be made because the target machine actively refused it.
OLE DB provider "SQLNCLI" for linked server "Linked server name" returned message "Login timeout expired". OLE DB provider "SQLNCLI" for linked server "linked server name" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". (Microsoft SQL Server, Error: 10061)
even if I create the linked server using the management studio I am getting the following error when I try to test the connection for the linked server.
TITLE: Microsoft SQL Server Management Studio ------------------------------ "The test connection to the linked server failed." ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The OLE DB provider "DB2OLEDB" has not been registered. (Microsoft SQL Server, Error: 7403) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=7403&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------
In one of my applications running on a MSSQL database, I need to issue a select call to an Oracle database to pull information into my application.
To accomplish this,
1. the ORacle Admin has created a view of the Oracle database for me. 2. I have installed the Oracle client on the SQl server box. 3. A friend has told me that one way to accomplish this is create a linked server from SQL to use OLE/DB for Oracle to connect to the Oracle database 4. So I create the linked server successfully; create the server login sp_addlinkedsrvlogin successfully 5. When I go to query the database, I get the error below:
Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'MSDAORA' reported an error. [OLE/DB provider returned message: The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 (or greater) client software installation.
You will be unable to use this provider until these components have been installed.]
Hi,Please help, I'm getting desperate. Any ideas warmly welcomed!I'm trying to read from a basic excel file (1000 or so rows fromcolumn A) but am having problems. The code I am using is:Declare @Return IntSET NOCOUNT ONExec @Return= [master]..[sp_addlinkedServer] 'READ_XLS', 'EXCEL','Microsoft.Jet.OleDB.4.0' , 'e:jsbackupRACodes.xls',NULL, 'EXCEL 8.0'print 'set up Return : ' + convert(varchar(10),@Return)--NB E: is the drive as seen oon the serverEXEC sp_addlinkedsrvlogin@rmtsrvname = 'READ_XLS',@useself = 'true'print 'login Return : ' + convert(varchar(10),@Return)When I try to read from the (one) excel sheet in the file, viaSelect * from [READ_XLS]...RACodes$or to list what tables/sheets are available, viaexec sp_tables_ex 'READ_XLS'I get the following error:OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.Authentication failed.[OLE/DB provider returned message: Cannot start your application. Theworkgroup information file is missing or opened exclusively by anotheruser.]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'IDBInitialize::Initialize returned 0x80040e4d: Authenticationfailed.].What am I missing?*Many* thanks in advance.Andy
This is the siuation: I have on server A SQL 2005 on server B i have SQL 2000
I want to create in a database on server A a view which uses a linked server to get data from server B. The linked server works fine. But when I want to execute the creation of that view i get this error:
OLE DB provider "SQLNCLI" for linked server "BI_AX_LINK" returned message "Unspecified error". OLE DB provider "SQLNCLI" for linked server "BI_AX_LINK" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.". Msg 7311, Level 16, State 2, Procedure VW_ASSETTABLE, Line 1 Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "BI_AX_LINK". The provider supports the interface, but returns a failure code when it is used.
I have checked and the collations between the to databases are the same. Anyone an idea on who to do such thing? The rights that i have an server B or not that much.
Below is the syntax I am using for creating Linked server from SQL Server i.e windows 2008 R2 standard to Postresql database running on Linux 32 bit Debian (Linux turtle 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1+deb7u1 i686 GNU/Linux) and the version of Postresql is 8.3
/****** Object: LinkedServer [HGCDEV] Script Date: 09/15/2015 17:03:37 ******/ EXEC master.dbo.sp_addlinkedserver @server = N'HGCDEV', @srvproduct=N'', @provider=N'MSDASQL', @datasrc=N'172.16.20.159',@provstr=N'UID=web;PWD=dev123' /* For security reasons the linked server remote logins password is changed with ######## */ EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'HGCDEV',@useself=N'False',@locallogin=NULL,@rmtuser='web',@rmtpassword='dev123'
This the error I am getting " Cannot initializee the data source object of OLE DB provider "MSDASQL" for linked server "HGCDEV".
How to setup the linked server........... Below are the drivers installed on the SQL server
And while querying the linked server from the query analyzer using the following select command
SELECT * FROM REMOTE_OFFICE.RealEstate_Office1.dbo.E_GOV_RE_OK
I got the following error
Server: Msg 7312, Level 16, State 1, Line 1 Invalid use of schema and/or catalog for OLE DB provider 'Microsoft.Jet.OLEDB.4.0'. A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog and/or schema. OLE DB error trace [Non-interface error].
I am trying to create a linked server in SQL Server 2005 to show tables in our AS400. I made the connection, however, the tables are not showing up under the Linked Server name.
How do you get the linked tables to display in the Linked Server folder?
When I created a linked Server to the DB2 on iseries ( V4R5) , the SELECT statement fetches me only the first record and the following message appears.
OLE DB provider "MSDASQL" for linked server "DB2TEST" returned message "[IBM][Client Access Express ODBC Driver (32-bit)]Driver not capable.".
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "DB2TEST".
I am using 'MSDASQL' which refers to the DSN setup on my machine using the ODBC "Client Access Driver 32-bit"
Strangely when I used the same DSN in SQL 2000 within the DTS package, I was able to connect and import data and worked like a charm.
I'm trying to use linked server to import big amount of data(around 9 million rows) from mysql to a sql 2005 table. I plan to create a stored procedure and use job agent to run it at off-peak time everyday. The SP is like:
..... Truncate table sqltblA;
Insert Into sqltblA(col1, col2, col3) Select col1, col2, col3 From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB') .....
But when I tried to CREATE the above SP from management studio, seems the sql server was trying to get all data from table mytblB and ended up with failure after several minutes hang. The error message is sth. like "running out memeory". BTW, during that several minutes hang, I can't query mytblB using mysql's tool as well. it seems to me that table got locked.
However if i try to change the returned result to 100,000 rows by changing script to
Insert Into sqltblA(col1, col2, col3) Select col1, col2, col3 From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB Limit 100000') The SP could be created without any problem and running the SP could get the data in table sqltblA. But that's not what I want, I need all rows instead of a certain amount of rows.
Does anyone know what's going on there when I try to CREATE that SP and any solution to it?
Plus I tried to use SSIS as well. When I'm configuring the DataReader source, which uses ADO.NET's ODBC option to connect to mysql, if its sqlcommand is "select * from mytblB" without the Limit key word, then the configuration page will hang there as well and table mytblB is not accessible by using mysql tool. I'm just sick of wasting time on that and that's why I chose to use SP istead of SSIS. But same result. :-(
I need to create a linked server to a SQL 2005 server (B) from another SQL 2005 server (A). Problem is that Server B's name has a dash in it, and SQL Server doesn't like dashes in the name when running a query against the linked server. Server B's network name is Server-B. For example, from Mgt Studio on Server A, I've created a link to Server B whose name is Server-B, so in my query from Server A, I issue: SELECT * FROM Server-B, and get the following error message:
I have SQL Server 7.0 running on a NT server. I need to get data from an access database on another NT server on the network. Can I have it mapped to a logical drive and create a linked server and get data to be used in my stored procs. Please help !! Thanks
I am running SQL Server 7.0 and am trying to set up a linked server to an access database so I can use a SQL7 stored procedure to update the access database.
I create the linked server as: sp_addlinkedserver @server = N'LinkedServer', @srvproduct = N' ', @provider = N'Microsoft.Jet.OLEDB.4.0', @datasrc = N'MyServerest2.mdb', @catalog = N'' GO
I then try setting up the security in the security tabs to impersonate a user I have set up in the access database.
I also have NT security on the directory of the access database to limit the users who can access the directory.
My problem is that when I try to run the sql: "select * from LinkedServer...IMS" (IMS is the tablename) I get the following error: Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. [OLE/DB provider returned message: The Microsoft Jet database engine cannot open the file 'ASPECT04accpactestest2.mdb'. It is already opened exclusively by another user, or you need permission to view its data.]
If I add "Everyone" tpo the security level on the NT directory it works fine, so I obviously have a security problem.
Can anyone tell me what user the sql is running under.
I am new to SQL server. I have a pbm setting up a linked server to MS Access using ODBC. My MS Access database is in the Netware server. I have mapped the NT server to this Netware server using a binary account. Then I have setup the ODBC connection. I tested the ODBC its ok. But when I try to view to tables in the Linked server it gives me an error "Disk or Network Error". I am breaking my head for the past few days. If you have any solution. Pls reply. Thanks in advance.
After converting to SQL Server 2005 and VS2005 I am having a problem connecting to Linked Servers for Access databases. I have searched and read everything I can find, but the solution is still not evident. I have a lot of data integration and data conversion procedures to run and I am stuck at this point not understanding exactly what the problem is and how to resolve it. I believe it is somehow related to "double hop" and permissions with .NET. Many of the discussions are related to using .ASP but that is not involved in this situation.
The Linked Server is defined using the UNC path. The machines are not in a domain. They are in the same LAN segment. Connections will be made without using a security context is specified. A sample Linked Server definition:
EXEC master.dbo.sp_addlinkedserver @server = N'ACCESS EDUCATION', @srvproduct=N'OLE DB Provider for Jet', @provider=N'Microsoft.Jet.OLEDB.4.0', @datasrc=N'\Tacir2k3InfrastructureDatabasesJuly 2005 DatabasesEducationEduDb2005_TR_Db.mdb'
The error:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "ACCESS EDUCATION" returned message "The Microsoft Jet database engine cannot open the file '\Tacir2k3InfrastructureDatabasesJuly 2005 DatabasesEducationEduDb2005_TR_Db.mdb'. It is already opened exclusively by another user, or you need permission to view its data.".
Machine 1 (Developer Workstation): XP SP2 with latest security patches; SS Management Studio, VS2005
Machine 2 (SQL Server server): Windows 2003 Server with SS2005. The Linked Servers are defined on an SS2005 instance on this machine.
Machine 3 (File server): Windows 2003 Server that contains the Access DB files
When I run SS Management Studio on Machine 2 (the database server), I have no problem accessing the Linked Server pointing to an Access DB file on Machine 3 and can compile or run SPs referencing the Linked Server.
When I run SS Management Studio on Machine 1 to execute an SP that references the Linked Servers, I get the above error.
When I use Machine 1 to compile an SP that references the Linked Server, I get the above error.
I tried granting Everyone Full Control to the folder that contains all the Access database subfolders but I get the same error when running from Machine 1.
I am trying to configure a linked server to a local Access database with no security and only one table.
I set it up and tested on a test machine first and all works fine. I then did the same on our production box and receive the error below.
Server: Msg 7303, Level 16, State 2, Line 1 Could not initialize data source object of OLE DB provider 'Microsoft.Jet.OLEDB.4.0'. [OLE/DB provider returned message: Not a valid account name or password.]
I then set it up on another production box and it worked for a while but now I get a different error.
Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. [OLE/DB provider returned message: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.]
Is there a server level setting that could be different on these machines that could be causing this?
I have an Access database (name "Shipping") linked to SQL Server. The Access database is not secured. My access file is located on the same machine as the instance of SQL Server, in a shared folder that can be accessed by any user. The file permissions are set to full control for Everyone. I linked Access with the following procedure:
EXEC sp_addlinkedserver @server = 'Shipping', @provider = 'Microsoft.Jet.OLEDB.4.0', @srvproduct = 'OLE DB Provider for Jet', @datasrc = 'C:ShippingShipping BackEnd.mdb'
then modified the linked server login mapping with:
Now, since I have domain administrator permissions, I can run a stored procedure in SQL Server that does a Select in the Access database without any problem. But when a normal user tries to run the procedure, he gets an error #7399. If I give this user domain administrator rights, he's able to run the procedure. There is something I don't get, with normal user permission, this user can open the Access database through the shared folder...
Hi, I'm working with MSSQL2K+SP3a, Standard Edition. I defined linked server (MSDE). On the local server, I can do select * from [testDB].[INFORMATION_SCHEMA].[TABLES] -- local
select * from [testSRV].[testDB_far].[dbo].[sysobjects] -- linked
but not
select * from [testSRV].[testDB_far].[INFORMATION_SCHEMA].[TABLES]
How can I access the INFORMATION_SCHEMA on the linked server ?
There seems to be a lot of confusion around the groups about linkingto an Access mdb with the SQL Server Jet OLE DB provider and I haventbeen able to find a straight forward solution. Basically, I have anAccess MDB (A2K) on one server and a SQL Server DB (2005 std ed.) onanother - Both on the same network. I'm trying to create a linkedserver object in the SQL server to view data in the mdb. I've set itup and it works - but only from the server machine itself. If you tryto connect the the linked server from any other computer on thenetwork you get the usual access denied / file in use error.The fact that I can use the linked server from the server box itselfbut not from another pc on the network makes me think that it may be apermissions problem. But I am logging in with full Admin rights andstill no joy. Also there is no workgroup security on the mdb, so thatsnot the problem. I've used the surface editor to remove anyrestrictions that may cause problems, OLE DB connect, OPENROWSET etc.but still no joy.I've tried mapping the mdb's location on the server so I could use astandard filepath, rather than a //Server-Name/... path. Again, worksfrom the server, but not from any client PCs, so no joy there either.In frustration, I copied the mdb to the same server and viola - fullaccess to the linked server from anywhere. But this is no good, I needthe mdb file to stay where it is. An mdb full of linked tables wontwork... they don't show up in the linked server.So that's it - out of ideas! Am I just going to have to accept thatlinked server objects are limited just to mdb files on the same servermachine, or is there something I'm missing??? Firewalls, servicelogins, server settings.... something one of you gurus out there knowabout that might be the key to making my headache go away!!!Any input gratefully recieved!!!
I've set up a linked server to an Access database and read from the linked database in a stored procedure. No problems when I execute the stored procedure from management studio and the Access database resides on a local drive.
However, when I move the database to a network share drive and run the proc through a scheduled job using SQL Server Agent I get the following error --
"Executed as user: C-SGROUPactprod. Access to the remote server is denied because the current security context is not trusted. [SQLSTATE 42000] (Error 15274)."
I've spent days trying to resolve this problem and tried many different setting to fix the problem, but no luck yet.
Under the Security setting for the linked server I have "Be made using this security context" selected with a valid id/password. I am able to login to the server where the database resides using the id and password and successfully open the database.
Could anyone shed some light on the syntax of accessing system function on a linked server?I'm trying to get the recovery models of databases on a linked. However using databasepropertyex locally generates wrong results.e.g. select databasepropertyex(name, 'recovery') RecoveryModel from [server/databasename].master.dbo.SysDatabases I tried select [server/databasename].databasepropertyex(name, 'recovery') RecoveryModel from [server/databasename].master.dbo.SysDatabases which does not work. Thanks.
No matter how I configure my link going thru EM I get a 7399 or 7303 error. First I tried to link to an Access 2000 db on a Windows 98 station. Next I installed Access 2000 on the test server with SS7, SP 2 (Windows NT 4, SP 5) and still the same errors. Is it possible to set up Access 2000 as a linked server on SS7? Can you give me the brainless man's walk-thru so I can get over this hump?
Hello, We are currently live with a CRM solution (Siebel) that uses SQL Server 6.5 as the back end. All is fine and dandy, except I have some reservations about security. Quite simply, it is possible for anyone to open up MS Access and link to any of the SQL Server database tables via the ODBC DSN used by the Siebel front end. This DSN is necessary for Siebel to function. I am bit worried that someone (out of incompetence or spite) might do just that and cause some serious damage. Its probably technically beyond the large proportion of our users (especially those that could make mistakes!), but I can't get the nagging fear out of my head. Does anyone know of anyway to combat this problem? I have scoured the web, including this site, and cant seem to get any information on this. Thanks and Regards Dike
I have built several Linked Servers from my SQLServer 7 database to some Access 97 MDB files sitting on a Novell file server. When I am physically sitting at the SQLServer I can access/modify data through the links just fine. I have successfully built views, stored procs and jobs referencing these links and they all work perfectly ... As long as I am sitting at the SQLServer. So if I execute 'Select * from RT1...Emp' I get data back.
Now my problem. If I connect to the server from Query Analyser on a different machine I can not execute and anything that references a linked server. If I execute 'Select * from RT1...Emp' I get.
Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error [OLE/DB Provider returned message: DIsk or Network error.]
I want to be able access various views and stored procs via a VB app so. Eventually I will be moving all of the Access data into the SQLServer but for now I must access the data via links.