2013-06-27 3 views
0

SQL Server Management Studio에서 Access 2000 데이터베이스에 연결하려고합니다. 현재 쿼리는 다음과 같습니다.OpenRowSet을 사용하여 SQL Server Management Studio에서 Access 2000 데이터베이스에 연결

sp_configure 'show advanced options', 1; 
RECONFIGURE; 
GO 
sp_configure 'Ad Hoc Distributed Queries', 1; 
RECONFIGURE; 
GO 

Select FName 
From 
OpenRowSet('Microsoft.ACE.OLEDB.12.0', 
'\\bespin\Files\GDrive\CPros\Databases\Client.mdb'; 
'admin';'', 
Residents) 

원래 Microsoft.Jet.OLEDB.4.0을 공급자로 사용하려고 시도했습니다. 두 서버는 실제로 64 비트 운영 체제에서 실행되기 때문에 Microsoft.ACE.OLEDB.12.0으로 전환해야했습니다.

내가 확인했다
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "The Microsoft Access database engine cannot open or write to the file '\\bespin\Files\GDrive\CPros\Databases\Client.mdb'. It is already opened exclusively by another user, or you need permission to view and write its data.". 
Msg 7303, Level 16, State 1, Line 2 
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". 

, 아무도 열려있는 데이터베이스가 없습니다 :이 쿼리를 실행

다음과 같은 오류를 반환합니다. 나는 시도하고 데이터베이스에 대한 관리 액세스 뭔가에 사용자 이름과 암호를 변경하는 경우, 대신 다음과 같은 오류를 반환

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Not a valid account name or password.". 
Msg 7399, Level 16, State 1, Line 2 
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Authentication failed. 
Msg 7303, Level 16, State 1, Line 2 
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". 

을 궁극적으로 내가 일해야하는 것은 INSERT의 시리즈를 실행 할 수있다/UPDATE 문은 변환 과정에서 데이터베이스를 교체 할 때까지 데이터베이스를 최신 상태로 유지합니다. 이러한 쿼리를 성공적으로 실행하려면 무엇을 변경해야합니까?

답변

0

지정한 경로가 잘못되었습니다.

그것은 엑셀 시트의 예를 다음과 같이해야합니다 :

select * from OPENROWSET(  
    'Microsoft.ACE.OLEDB.12.0','Excel 8.0;Database=D:\Band.Xlsx',   
    'SELECT * FROM [SheetName$]'); 
0

는, 사용자 관리에 유의하시기 바랍니다이 시도는 대소 문자를 구분

Select FName 
From 
OpenRowSet('Microsoft.ACE.OLEDB.12.0', 
'\\bespin\Files\GDrive\CPros\Databases\Client.mdb'; 
'Admin';'', 
Residents) 
관련 문제