Solved

SQL Server 2008 OLE Automation Issues

Posted on 2010-08-15
12
784 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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.
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
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now