Showing posts with label provider. Show all posts
Showing posts with label provider. Show all posts

Wednesday, March 21, 2012

Problems with OraOLEDB.Oracle

Good day everyone....

I have installed the OraOLEDB.Oracle Provider on 3 different servers, and have made a link server on all three.

On two of the machines, I am successful in retrieving data from the Oracle database. But, on the third machine, I receive this error:

Server: Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "employee_prod" reported an error. The provider did not give any information about the error.
Server: Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "tims2_prod".

On the machine which is generating the error, I can use SQL*Plus to connect to the remote database. I can also connect to the database using the "ODBC Data Source Administrator" when I create a system DSN. It would appear that the driver is installed and working correctly, but SQL Server can not access it.

I have also uninstalled/installed serveral times.

All of our servers are running W2003 Standard X64 with SQL Server 2005 Standard 64-bit Edition.

Does anyone have any suggestions?

Found the solution.... "Allow inprocess" has to be checked in the provider options.|||

hi can you please send me the steps on how to stepup a connection to Oracle Database throught SQL Database.

I have created a linked server, but i keep getting an error message

OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN".

My tns string is Prooracle and the database is oracle and the Schema is HR

appreciate your help

|||

I had the same symtoms and did the re install etc. The item was checked and I unchecked it and it now works. Something to do with triggering a change in settings ?

|||It works, thanks. by unchecking the "Allow inprocess" option.|||I spent some time to find the option. From SQL Server Management Studio-->Server Objects-->Linked Servers-->Providers-->MSDAORA, right click select properties.

Problems with OraOLEDB.Oracle

Good day everyone....

I have installed the OraOLEDB.Oracle Provider on 3 different servers, and have made a link server on all three.

On two of the machines, I am successful in retrieving data from the Oracle database. But, on the third machine, I receive this error:

Server: Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "employee_prod" reported an error. The provider did not give any information about the error.
Server: Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "tims2_prod".

On the machine which is generating the error, I can use SQL*Plus to connect to the remote database. I can also connect to the database using the "ODBC Data Source Administrator" when I create a system DSN. It would appear that the driver is installed and working correctly, but SQL Server can not access it.

I have also uninstalled/installed serveral times.

All of our servers are running W2003 Standard X64 with SQL Server 2005 Standard 64-bit Edition.

Does anyone have any suggestions?

Found the solution.... "Allow inprocess" has to be checked in the provider options.|||

hi can you please send me the steps on how to stepup a connection to Oracle Database throught SQL Database.

I have created a linked server, but i keep getting an error message

OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN".

My tns string is Prooracle and the database is oracle and the Schema is HR

appreciate your help

|||

I had the same symtoms and did the re install etc. The item was checked and I unchecked it and it now works. Something to do with triggering a change in settings ?

|||It works, thanks. by unchecking the "Allow inprocess" option.|||I spent some time to find the option. From SQL Server Management Studio-->Server Objects-->Linked Servers-->Providers-->MSDAORA, right click select properties.

Problems with OraOLEDB.Oracle

Good day everyone....

I have installed the OraOLEDB.Oracle Provider on 3 different servers, and have made a link server on all three.

On two of the machines, I am successful in retrieving data from the Oracle database. But, on the third machine, I receive this error:

Server: Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "employee_prod" reported an error. The provider did not give any information about the error.
Server: Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "tims2_prod".

On the machine which is generating the error, I can use SQL*Plus to connect to the remote database. I can also connect to the database using the "ODBC Data Source Administrator" when I create a system DSN. It would appear that the driver is installed and working correctly, but SQL Server can not access it.

I have also uninstalled/installed serveral times.

All of our servers are running W2003 Standard X64 with SQL Server 2005 Standard 64-bit Edition.

Does anyone have any suggestions?

Found the solution.... "Allow inprocess" has to be checked in the provider options.|||

hi can you please send me the steps on how to stepup a connection to Oracle Database throught SQL Database.

I have created a linked server, but i keep getting an error message

OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN".

My tns string is Prooracle and the database is oracle and the Schema is HR

appreciate your help

|||

I had the same symtoms and did the re install etc. The item was checked and I unchecked it and it now works. Something to do with triggering a change in settings ?

|||It works, thanks. by unchecking the "Allow inprocess" option.|||I spent some time to find the option. From SQL Server Management Studio-->Server Objects-->Linked Servers-->Providers-->MSDAORA, right click select properties.

Problems with OraOLEDB.Oracle

Good day everyone....

I have installed the OraOLEDB.Oracle Provider on 3 different servers, and have made a link server on all three.

On two of the machines, I am successful in retrieving data from the Oracle database. But, on the third machine, I receive this error:

Server: Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "employee_prod" reported an error. The provider did not give any information about the error.
Server: Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "tims2_prod".

On the machine which is generating the error, I can use SQL*Plus to connect to the remote database. I can also connect to the database using the "ODBC Data Source Administrator" when I create a system DSN. It would appear that the driver is installed and working correctly, but SQL Server can not access it.

I have also uninstalled/installed serveral times.

All of our servers are running W2003 Standard X64 with SQL Server 2005 Standard 64-bit Edition.

Does anyone have any suggestions?

Found the solution.... "Allow inprocess" has to be checked in the provider options.|||

hi can you please send me the steps on how to stepup a connection to Oracle Database throught SQL Database.

I have created a linked server, but i keep getting an error message

OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "DBCONN".

My tns string is Prooracle and the database is oracle and the Schema is HR

appreciate your help

|||

I had the same symtoms and did the re install etc. The item was checked and I unchecked it and it now works. Something to do with triggering a change in settings ?

|||It works, thanks. by unchecking the "Allow inprocess" option.|||I spent some time to find the option. From SQL Server Management Studio-->Server Objects-->Linked Servers-->Providers-->MSDAORA, right click select properties.sql

Tuesday, March 20, 2012

Problems with MS OLE DB Provider for IBM DB2

Hi,

I am using MS SQL Server Developer's Edition.
I have downloaded the MS OLE DB Provider for IBM DB2.


However, when I am trying to create a connection to the IBM DB2 source in my SSIS Package, I am getting the following error:

Code Snippet

TITLE: Connection Manager

Test connection failed because of an error in initializing provider. The parameter is incorrect.


Any idea as to what could be the problem with this?

Thanks and Regards,
B@.ns

As I said in the other post 'ibm db2 as datasource': you still need the IBM client-access software to access the IBM DB2 databases. The Microsoft db2 provider is only a layer on top of that.|||

AVNIP,

Are you trying to connect to IBM DB on AS/400?

If yes, I can provide you the detailed steps how to configure the MS OLE DB provider for DB2

Regards,

Yitzhak

|||

Jan DHondt wrote:

As I said in the other post 'ibm db2 as datasource': you still need the IBM client-access software to access the IBM DB2 databases. The Microsoft db2 provider is only a layer on top of that.

I don't believe this is true. It isn't like the Oracle driver.|||

Phil is absolutely right.

Single MS OLE DB provider for DB2 supports multiple platforms:

- DB2/6000

- DB2/AS400

- DB2/MVS

- DB2/NT

The provider doesn't need anything else installed to work properly.

Regards,

Yitzhak

|||

Phil,

I have been using ibm iseries db2 and you need a client licence before the server will give you access. so it is a lot like Oracle. I had installed microsoft provider for db2 and connections did not work. I installed ibm series client and it did work with the microsoft provider after that. I think the server side checks if you have a valid licence to connect.

Maybe IBM licencing system is different on the servers that I have to work with.

|||

Jan DHondt wrote:

Phil,

I have been using ibm iseries db2 and you need a client licence before the server will give you access. so it is a lot like Oracle. I had installed microsoft provider for db2 and connections did not work. I installed ibm series client and it did work with the microsoft provider after that. I think the server side checks if you have a valid licence to connect.

so it is probably like Oracle.

We don't have the DB2 drivers installed on our servers and the Microsoft DB2 for OLE DB drivers work fine.|||

The Microsoft OLE DB Provider for DB2 is based on technology available in Microsoft Host Integration Server 2006.

That's why it is self-sufficient and doesn't need anything else to be installed to work.

It just needs the following (directlt from the readme file):

"...The Microsoft OLE DB Provider for DB2 is for use exclusively with Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Developer Edition and Microsoft SQL Server 2005 Evaluation Copy...."

Regards,

Yitzhak

Wednesday, March 7, 2012

Problems with creating Custom Log Provider

I am new to SSIS but I am learning fast. Any help is greatly appreciated.

I have written a custom log provider derived from LogProviderBase. I want to programmtically add the custom log provider to my package, but when I try this:

myPackage.LogProviders.Add("ACustomLogProvider");

I get the following exception:

"The log provider type "ACustomLogProvider" specified for log provider "{..GUID..}" is not recognized as a valid log provider type. This error occurs when an attempt is made to create a log provider for unknown log provider type. Verify the spelling in the log provider type name".

I have followed the instructions in BOL and as suggested in this forum, adding the DtsLogProvider attribute:

[DtsLogProvider(DisplayName="ACustomLogProvider", LogProviderType="ACustomLogProvider", Description="a description")]

Another way I tried is that I added a GUID attribute to my custom log provider class and then tried this:

Type aType = typeof(ACustomLogProvider);

Guid aGUID = (Guid)aType.GUID;

myPackage.LogProviders.Add("{"+ aGUID.ToString() +"}");

This also gives me the same exception "The log provider type ""{..the actual GUID for ACustomLogProvider..}" specified for log provider "{..a different GUID..}" is not recognized as a valid log provider type....

My questions are: Is it possible to add a custom log provider programmtically or must it be done through the SSIS Designer?

Must I deploy my custom log provider class for it to work programmatically? (I had perhaps wrongly assumed I would not have to deploy if I don't want it to show up in the SSIS Designer).

I would prefer to use a custom log provider instead of just logging within the SSIS event handlers because I can override the OnPostExecute, etc. but I cannot (can I?) override the specific event handlers like PackageStart, PackageEnd, etc because they are not exposed through DTSEvents.

Any help I would be very grateful for. Thanks.

I think you need to pass fully qualified type name to Add method:

myPackage.LogProviders.Add(aType.AssemblyQualifiedName);

|||

Thank you very much, Michael. That is working great.

I appreciate your help, especially since this seems like it was a trivial question. I should have been able to see that!

Thanks,

Amy

|||

Hi,

I've trying to create a custom log provider following msdn directions from:

http://technet.microsoft.com/en-us/library/ms365184.aspx

However, the example shown there for HtmlLogProvider does not work for me. I created the dll put it in every single folder it is indicated and also used gacutil and nothing. When I go to the SQL Server Business Intelligence Development Studio and I select "Logging" from the control flow, the only available log proivders that I see are the ones that came by default with the the IDE but not the one I created (HtmlLogProvider). I would like to know if you tried it and also had the same problem and if you could give me some advice of what to do.

Thanks so much

|||Try restarting the SSIS service.|||

I finally made it work for the HtmlLog Provider but sometimes it works and sometimes it does not. By some reason sometimes it does fill data inside the html and sometimes it does nothing with it. I have wondering what may be the reason.

The steps I followed once I had the Log Provider installed in the GAC and copied into the log provider folder was to do:

Logging

Add Custom log provider

and choose the package level and som of the events (On error, etc). I also tried selecting everything.

I also tried clickng on "Log Events" but what it does is only show a window with the logged events.

Please tell me if there is a bug with the log providers in SSIS or if I am not following the right steps.

Thanks a lot

|||

I'm not aware of any bug with the log providers. The stock log providers work using the same extensibility mechanism as you should be using, so if stock log providers work OK, you need to debug why yours is not working.

It is unclear what do you mean by "sometime it does nothing with it" - have you debugged whether the log provider receives the events you expect it to receive?

|||

I am sorry I was not too specific with what I meant. Let me try to make myself more clear. First I downloaded an example of an HtmlLogProvider from MS and tried it and worked. Now I was looking at the methods that are overwritten and I wanted to create my own log provider. So I tried to do it as simple as possible. So in my dummy example I just wanted to see the errors of my dtsx pacakge thru my cutom log provider. The code is as follows:

namespace HtmlLogProviderCS

{

using System;

using Microsoft.SqlServer.Dts.Runtime;

using System.IO;

using System.Web.UI;

using System.Web;

// The LogProviderType property is required but not used.

// The custom log provider will not appear in the list

// if a LogProviderType is not provided.

[DtsLogProvider(DisplayName = "MyLogProviderTest", Description = "A simple log provider.", LogProviderType = "Custom")]

public class HtmlLogProviderCS : LogProviderBase

{

#region Variables and constants

// Constants.

private const string SUBCOMPONENT = "HtmlLogProviderCS";

private const string PACKAGE_END_EVENT = "PackageEnd";

// Variables.

private Microsoft.SqlServer.Dts.Runtime.Connections _connections;

private Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents _events;

private string _configString;

private string _logFile;

private HtmlLogWriterCS _htmlLogWriter;

private MemoryStream _logStream;

private StreamWriter _logStreamWriter;

// Status flags.

private bool _fireEventsAgain=true;

private bool _loggingAlreadyStarted;

private bool _packageHasEnded;

#endregion

public override void InitializeLogProvider(Microsoft.SqlServer.Dts.Runtime.Connections connections, Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events, Microsoft.SqlServer.Dts.Runtime.ObjectReferenceTracker refTracker)

{

_events = events;

System.Windows.Forms.MessageBox.Show("Init");

}

public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events)

{

System.Windows.Forms.MessageBox.Show("Validate");

return DTSExecResult.Success;

}

public override void OpenLog()

{

System.Windows.Forms.MessageBox.Show("OpenLog");

}

public override void CloseLog()

{

System.Windows.Forms.MessageBox.Show("CloseLog");

}

public override void Log(string logEntryName, string computerName, string operatorName, string sourceName, string sourceID, string executionID, string messageText, DateTime startTime, DateTime endTime, int dataCode, byte[] dataBytes)

{

System.Windows.Forms.MessageBox.Show("Logging...");

System.Windows.Forms.MessageBox.Show("Message is: " + logEntryName + "--" + computerName + "--" + operatorName + "--" + sourceName + "--" + sourceID + "--" + executionID + "--" + messageText);

}

}

}

Many of the variables declared in there are just there cuz they were in the example I took form the HtmlLogProvider but other than that there's no reason for them to be there. So I really do not know why this Log is not working. The weird thing is that the message that am putting for every method does pop op correctly in every method EXCEPT for the LOG method which is not even invoked.

Problems with creating Custom Log Provider

I am new to SSIS but I am learning fast. Any help is greatly appreciated.

I have written a custom log provider derived from LogProviderBase. I want to programmtically add the custom log provider to my package, but when I try this:

myPackage.LogProviders.Add("ACustomLogProvider");

I get the following exception:

"The log provider type "ACustomLogProvider" specified for log provider "{..GUID..}" is not recognized as a valid log provider type. This error occurs when an attempt is made to create a log provider for unknown log provider type. Verify the spelling in the log provider type name".

I have followed the instructions in BOL and as suggested in this forum, adding the DtsLogProvider attribute:

[DtsLogProvider(DisplayName="ACustomLogProvider", LogProviderType="ACustomLogProvider", Description="a description")]

Another way I tried is that I added a GUID attribute to my custom log provider class and then tried this:

Type aType = typeof(ACustomLogProvider);

Guid aGUID = (Guid)aType.GUID;

myPackage.LogProviders.Add("{"+ aGUID.ToString() +"}");

This also gives me the same exception "The log provider type ""{..the actual GUID for ACustomLogProvider..}" specified for log provider "{..a different GUID..}" is not recognized as a valid log provider type....

My questions are: Is it possible to add a custom log provider programmtically or must it be done through the SSIS Designer?

Must I deploy my custom log provider class for it to work programmatically? (I had perhaps wrongly assumed I would not have to deploy if I don't want it to show up in the SSIS Designer).

I would prefer to use a custom log provider instead of just logging within the SSIS event handlers because I can override the OnPostExecute, etc. but I cannot (can I?) override the specific event handlers like PackageStart, PackageEnd, etc because they are not exposed through DTSEvents.

Any help I would be very grateful for. Thanks.

I think you need to pass fully qualified type name to Add method:

myPackage.LogProviders.Add(aType.AssemblyQualifiedName);

|||

Thank you very much, Michael. That is working great.

I appreciate your help, especially since this seems like it was a trivial question. I should have been able to see that!

Thanks,

Amy

|||

Hi,

I've trying to create a custom log provider following msdn directions from:

http://technet.microsoft.com/en-us/library/ms365184.aspx

However, the example shown there for HtmlLogProvider does not work for me. I created the dll put it in every single folder it is indicated and also used gacutil and nothing. When I go to the SQL Server Business Intelligence Development Studio and I select "Logging" from the control flow, the only available log proivders that I see are the ones that came by default with the the IDE but not the one I created (HtmlLogProvider). I would like to know if you tried it and also had the same problem and if you could give me some advice of what to do.

Thanks so much

|||Try restarting the SSIS service.|||

I finally made it work for the HtmlLog Provider but sometimes it works and sometimes it does not. By some reason sometimes it does fill data inside the html and sometimes it does nothing with it. I have wondering what may be the reason.

The steps I followed once I had the Log Provider installed in the GAC and copied into the log provider folder was to do:

Logging

Add Custom log provider

and choose the package level and som of the events (On error, etc). I also tried selecting everything.

I also tried clickng on "Log Events" but what it does is only show a window with the logged events.

Please tell me if there is a bug with the log providers in SSIS or if I am not following the right steps.

Thanks a lot

|||

I'm not aware of any bug with the log providers. The stock log providers work using the same extensibility mechanism as you should be using, so if stock log providers work OK, you need to debug why yours is not working.

It is unclear what do you mean by "sometime it does nothing with it" - have you debugged whether the log provider receives the events you expect it to receive?

|||

I am sorry I was not too specific with what I meant. Let me try to make myself more clear. First I downloaded an example of an HtmlLogProvider from MS and tried it and worked. Now I was looking at the methods that are overwritten and I wanted to create my own log provider. So I tried to do it as simple as possible. So in my dummy example I just wanted to see the errors of my dtsx pacakge thru my cutom log provider. The code is as follows:

namespace HtmlLogProviderCS

{

using System;

using Microsoft.SqlServer.Dts.Runtime;

using System.IO;

using System.Web.UI;

using System.Web;

// The LogProviderType property is required but not used.

// The custom log provider will not appear in the list

// if a LogProviderType is not provided.

[DtsLogProvider(DisplayName = "MyLogProviderTest", Description = "A simple log provider.", LogProviderType = "Custom")]

publicclassHtmlLogProviderCS : LogProviderBase

{

#region Variables and constants

// Constants.

privateconststring SUBCOMPONENT = "HtmlLogProviderCS";

privateconststring PACKAGE_END_EVENT = "PackageEnd";

// Variables.

private Microsoft.SqlServer.Dts.Runtime.Connections _connections;

private Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents _events;

privatestring _configString;

privatestring _logFile;

privateHtmlLogWriterCS _htmlLogWriter;

privateMemoryStream _logStream;

privateStreamWriter _logStreamWriter;

// Status flags.

privatebool _fireEventsAgain=true;

privatebool _loggingAlreadyStarted;

privatebool _packageHasEnded;

#endregion

publicoverridevoid InitializeLogProvider(Microsoft.SqlServer.Dts.Runtime.Connections connections, Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events, Microsoft.SqlServer.Dts.Runtime.ObjectReferenceTracker refTracker)

{

_events = events;

System.Windows.Forms.MessageBox.Show("Init");

}

publicoverride Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events)

{

System.Windows.Forms.MessageBox.Show("Validate");

returnDTSExecResult.Success;

}

publicoverridevoid OpenLog()

{

System.Windows.Forms.MessageBox.Show("OpenLog");

}

publicoverridevoid CloseLog()

{

System.Windows.Forms.MessageBox.Show("CloseLog");

}

publicoverridevoid Log(string logEntryName, string computerName, string operatorName, string sourceName, string sourceID, string executionID, string messageText, DateTime startTime, DateTime endTime, int dataCode, byte[] dataBytes)

{

System.Windows.Forms.MessageBox.Show("Logging...");

System.Windows.Forms.MessageBox.Show("Message is: " + logEntryName + "--" + computerName + "--" + operatorName + "--" + sourceName + "--" + sourceID + "--" + executionID + "--" + messageText);

}

}

}

Many of the variables declared in there are just there cuz they were in the example I took form the HtmlLogProvider but other than that there's no reason for them to be there. So I really do not know why this Log is not working. The weird thing is that the message that am putting for every method does pop op correctly in every method EXCEPT for the LOG method which is not even invoked.

Monday, February 20, 2012

Problems when retrieving cubes schema using OleDb

Hello,

I'm using Analysis Service 9.0 OleDb provider to retrieve a schema from the data source as follows:

Code Snippet

olapConnection.GetOleDbSchemaTable(OLAPSchemaGuid.Cubes, new object[] { catalogName });

The problem is that I cannot get a cube list from some catalogs. For example, I can list cubes from the "OLAPTestCube" catalog, but I cannot do this from the "Adventure Works DW". It seems to me the problem appeared after upgrading SQL Server to SP2. What may cause this behavior?

Thank you,

I've got it. The solution was to call the OleDbConnection.ChangeDatabase method. It seems to me that GetOleDbSchema method works in scope of the current catalog.