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
Solved

SQL Server 2008 OLE Automation Issues

Posted on 2010-08-15
12
801 Views
Last Modified: 2012-05-10
Hi all,

I have a program here which posts data directly to the tables of an SQL database via OLEDB. In SQL Server 2005 this worked perfectly when OLE Automation was turned on for the server and didn't miss a beat.

However now we have SQL Server 2008 and when I turn on OLE Automation it still fails. The error I am getting is session not opened so it appears  that some security features still need to be changed or switched off. Has anyone got any ideas as to what may be causing the session to fail opening?

Thanks
0
Comment
Question by:auschoc
  • 8
  • 4
12 Comments
 
LVL 7

Expert Comment

by:macentrap
ID: 33442636
Ole Automation in SQL Server 2008 by default is turned off for security reasons. sp_OACreate will start the OLE shared execution environment.

Try this pls!

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO
0
 
LVL 7

Expert Comment

by:macentrap
ID: 33442653
this could also be the issue with SOAP kit

and MS XML version --- for 2008 you would require version 6
0
 

Author Comment

by:auschoc
ID: 33442668
macentrap would that be on the client comptuer or the server computer?

i have tried the first solution without success :(
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Expert Comment

by:macentrap
ID: 33442784
first one will be on server as that where it is turned off.

What error you get there? .....is it still session not open




for XML and SOAP the environment have to be same on server and client.

in program do you also have reference to XML version ???
0
 

Author Comment

by:auschoc
ID: 33442847
hmmm i am not sure that SOAP and XML apply in this instance. Just to give you a heads up as to how the system works

In the registry we setup a string for the program to use for its SQL DB connection

The string is like this

Provider=SQLOLEDB;Server=Testing\SQLEXPRESS2;Uid=sa;Pwd=testing;Database=database

that string is then used within the code to connect to the SQL server and post data when a 'post' button is hit within the product. Would this still be XML/SOAP based? There is no web services involved.
0
 
LVL 7

Expert Comment

by:macentrap
ID: 33442853
also you please update the program you talking about , whats it coded in ?
0
 
LVL 7

Expert Comment

by:macentrap
ID: 33442863
sorry missed your comment, didnt updated...


no it does  not apply on this .

0
 
LVL 7

Expert Comment

by:macentrap
ID: 33442879
are you using 64 bit or 32 bit SQL  and version please
0
 
LVL 7

Expert Comment

by:macentrap
ID: 33442892
please add

Provider=SQLOLEDB;Server=Testing\SQLEXPRESS2;Uid=sa;Pwd=testing;Database=database; Trusted_Connection=True
0
 

Author Comment

by:auschoc
ID: 33442902
Thanks i'll try that and let you know how it goes :)

FYI program is coded in C# with some C++ legacy code.

both 64 bit and 32 bit (We support both) 2008 SQL R2 (Express and Full)
0
 
LVL 7

Accepted Solution

by:
macentrap earned 250 total points
ID: 33442949
0
 

Author Comment

by:auschoc
ID: 33443283
Winner :) Thanks!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

856 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