Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server 2008 OLE Automation Issues

Posted on 2010-08-15
12
Medium Priority
?
835 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

916 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