Solved

MS SQL OPENDATASOURCE

Posted on 2013-05-30
12
624 Views
Last Modified: 2013-06-03
Using OPENDATASOURCE Microsoft.ACE.OLEDB.12.0  and works just fine if used in Management studio on the SQL server but if from web page or via another Management Studio get the below errors;
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 "Unspecified error".
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error".      

If I add "Integrated Security=SSPI;" then the last two errors go away but get #1 on all three (MGT Studio x 2 and Web page)
0
Comment
Question by:crundle32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
12 Comments
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39210142
Have you configured the server for adHoq Querys.
It says error linked server, but you are using openrowset, look at:
http://msdn.microsoft.com/en-us/library/ms187569.aspx

If you prefere to use linked server, look at my example in:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL_Server_2008/Q_27955235.html

Regards Marten
0
 

Author Comment

by:crundle32
ID: 39210165
Ad Hoc is done, if i run the SQL directly on the machine it works fine, run it awaywhere else I get the error.

It's reading an excell work sheet "\\Storage\ExcelFiles\Filename.xlsx, with permissions set "everyone" "Full Control"
0
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39210288
Are the different servers the same
i e SQL Version, AND are the OS versions the same, i e 32 or 64 bit.

The share is it a Windows machine, or a nas/san thing

Regards Marten
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 39211235
How you configured the linked server?
The 32bit or 64bit question is also pertinent.
0
 

Author Comment

by:crundle32
ID: 39212314
I have tried both via network path and local on SQL server, please remember it works when I log directly into the server mgt studio. I created a xp_cmdshell in SP and ran from the web page worked fine to get the Dir.

All systems are 64 bit
0
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39212453
Check what account runs the sql server service, and the agent service.
If it's local system, try altering to network service. Or even better a domain account.

If it still wont work with a domain account, then run ssms as another user, use the sql service/agent service domain account. Now with this credential run the cmdshell against the network share, i'm betting you'll get some error thats understandable and will lead you to a solution.

Regards Marten
0
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39212455
Oh yes, remember to alter the accounts in the sql server configuration manager.

Regards Marten
0
 

Author Comment

by:crundle32
ID: 39212825
Pls explain more on how to set the account used. From web page I had to add domain\computername for access which I further confirmed by creating a script that logs user_name.
0
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39213194
SQL Server Configuration Manager is used to change the account. This is because the ACL for the filesystem are altered.
The account needs to exist, should be a normal service account created in the AD.
This account should have read permission on the sharing and ACL on the Excel file.

What are your specific question:
How to create a serviceaccount in the AD?
How to change using SSCM?
Something else?

Im not talking about a webserver, I'm referencing the SQL instance host.

Regards Marten
0
 

Author Comment

by:crundle32
ID: 39214951
I guess it would be "Change SSCM", I know how to create in AD, I understand creating users in the Security>Logins, but how to get the t-sql to run and a specific user as I believe the webpage is calling network service  which is where the permission is causing the error. Hence once I login directly as admin it works.
0
 
LVL 20

Accepted Solution

by:
Marten Rune earned 500 total points
ID: 39215375
Use:  Start/all programs/your flavour of SQL/configuration Tools/SQL Server Configuraration Manager.
Click on it to start it.
find your SQL Server service (instance) Icon, right right-click and choose properties, choose log on tab and enter your domain account, optional network service (then it will authenticate as the server/workstation, i e Hostname$.

Regards Marten
0
 
LVL 20

Expert Comment

by:Marten Rune
ID: 39215376
You might want to authenticate the SQL Server Agent account with the same account, just repeat the same process but with the SQL Server Agent (instance) as the chosen object, instead of the SQL Server service (instance) object.

All is written straight out of my head. But Im fairly sure the names/and paths are correct.

Regards Marten
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question