I have some issue when executing scripts in SQL.
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 8.0;Database=D:\Application\myExcel.xls;',
'SELECT * FROM [Sheet1$]')
When I login to SQL Server with Windows authentication, the script above runs successfully.
But when I login to SQL Server with SQL Server authentication (not sa account), the script throw this error:
Msg 7399, Level 16, State 1, Line 8
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 8
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
Could anyone please tell me why and how to fix it?
I'm using SQL Server 2012 (x64), Windows Server 2012 R2.
Thank you very much.
Related
i'm trying to connect from sql server to oracle server with OPENROWSET for fetch data.
this is my query:
SELECT a.*
FROM OPENROWSET(N'OraOLEDB.Oracle', N'Data Source=Myip:Port/dbname';'User Id=user';'Password=pass;',
'select * FROM view WHERE value = ''102030'' ') AS a;
sql return below error:
OLE DB provider "OraOLEDB.Oracle" for linked server "(null)" returned
message "ORA-12154: TNS:could not resolve the connect identifier
specified". Msg 7303, Level 16, State 1, Line 23 Cannot initialize the
data source object of OLE DB provider "OraOLEDB.Oracle" for linked
server "(null)".
how can i fix this ?
I used Linked Server for fetch data but oracle table not small and it takes a long time to execute.
How do I need to call an Oracle function with ref cursor output in a SQL Server linked server?
I used this statement:
SELECT *
FROM OPENQUERY(oracle, 'select * from functionname(''N'',''2016-11-01'')')
but I get this error
OLE DB provider "OraOLEDB.Oracle" for linked server "oracle" returned message "ORA-00933: SQL command not properly ended".
Msg 7321, Level 16, State 2, Line 33
An error occurred while preparing the query "select * from functionname('N','2016-11-01')" for execution against OLE DB provider "OraOLEDB.Oracle" for linked server "oracle".
Any help?
Maybe this will help?
Calling an Oracle function from SQL Server Linked Server
EXECUTE (Query, Parameters) AT LinkedServerName
While importing data from excel 2010 into SQL Server 2012 I am getting following error:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
<
I am using following query:
SELECT * INTO dbo.headers
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0' ,'Excel 12.0;Database=C:\Users\ishu.bhardwaj\Desktop\02.xlsx;HDR=YES;IMEX=1' ,'SELECT * FROM [Sheet1$]')
Regards
Ishu Bhardwaj
Cause 1: You may receive this error if the Excel file is currently opened.
Solution 1: Close the Excel file if it is currently opened and try executing again.
I am trying to connect Oracle 9i database using SQL Management studio 2008.
I tried this but it doesn't work
EXEC sp_addlinkedserver 'OracleLinkedServer','Oracle','OraOLEDB.Oracle','TestDB';
EXEC sp_addlinkedsrvlogin 'OracleLinkedServer','false','SA','TestUsername','TestPassword';
I am able to create the linked server and it test correctly,
But when I execute this statement:
SELECT sysdate FROM OracleLinkedServer...dual;
...it gives an error:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" reported an error. Provider caused a server fault in an external process.
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer". The provider supports the interface, but returns a failure code when it is used.
You should UNCHECKED the Allow inprocess in OraOLEDB.Oracle provider under the Linked Servers node.
I'm trying to export records from SQL Server 2008 to mdb file using OpenDataSource. It works when I log in using Windows authentication. But it fails when I use SQL Server authentication.
This is the error I get
OLE DB provider
"Microsoft.Jet.OLEDB.4.0" for linked
server "(null)" returned message
"Could not delete from specified
tables.". Msg 7320, Level 16, State 2,
Procedure EXPORT_Employee, Line 110
Cannot execute the query "DELETE FROM
employee_export " against OLE DB
provider "Microsoft.Jet.OLEDB.4.0" for
linked server "(null)".
A bit speculative but maybe you need to grant the SQL Server Service Account Write Access to the mdb file and make sure that you don't have it open at the same time.
Edit: A different type of permissions error anyway I think http://blogs.msdn.com/spike/archive/2008/07/23/ole-db-provider-microsoft-jet-oledb-4-0-for-linked-server-null-returned-message-unspecified-error.aspx