Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server 2008 OLE Automation Issues

Posted on 2010-08-15
12
Medium Priority
?
825 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 1000 total points
ID: 33442949
0
 

Author Comment

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

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

721 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