Showing posts with label tricky. Show all posts
Showing posts with label tricky. Show all posts

Thursday, March 8, 2012

custom log provider - not recognised.

Hi All,

I have a tricky one for you...

1. I create a custom log provider on machine A.

2. I deploy the signed assembly to thehttp://DTS/90/LogProviders directory & the GAC on both machine A & machine B.

3. I create a new package on machine A & go to enable logging for this new custom provider: I find it in the drop-down list of providers, and I can add it successfully.

4. I create a new package on machine B & go to enable logging for this new custom provider: I find it in the drop-down list of providers, but I can't add it. I get the following error:

'...failed to create log provider...the log provider type "_" specified for log provider "_" is not recognized as a valid log provider type. This occurs when an attempt is made to create a log provider for an unknown log provider type. Verify the spelling in the log provider type name (package)."

Any ideas anyone?

Tamim.

All I can suggest is to double check the version you have in LogProviders folder and the GAC, and perhaps clean out any duplicate/old versions. Restart VS as well if you make any changes. Seems simple but I know I have confused myself when developing stuff and it has been redeployed after some changes.|||

Many thanks for responding Darren. Both your suggestions are sound, but unfortunately they aren't applicable in this case: in order to rule out any problem introduced by my own work, I tried the same with HtmlLogProviderCS - one of Microsoft's own custom log providers, included in their samples - and I recreated the problem exactly. I didn't change the version and it wouldn't have existed on my machines beforehand, so it's definately something else. In essence, there is a problem in deploying the signed assembly of a custom log provider, onto any machine on which the library was NOT built. (Depending on your level of curiosity, perhaps you might like to try the same with HtmlLogProviderCS yourself?). I might contact Microsoft directly on this one, as I fear it may be a bug.

Thanks again for your input. I'm enjoying the book (am returning to it again & again!), and will let you know if I reach a definate conclusion.

Cheers,

Tamim.

|||

I figured it out!! Basically the error message means that it couldn't find the custom object's DLL in the GAC, and the problem was that I drageed-&-dropped the library into the GAC, across servers - i.e. from a location on server A to the GAC on server B. This looks like it has worked, but in actual fact it didn't. When I remoted onto server B & opened the GAC up locally, it wasn't there. The solution therefore was to drag-&-drop into the GAC on server B, from a location on server B. But now for a tantilising follow up...

...my custom log provider opens up a client-side channel to a remote server, and sends messages into it. When I run the package from the package store it works, but when I run it from within a job the job succeeds and throws no errors or warnings, but the remoting bit doesn't work. I had added my remoting client-side configuration information into dtexecui.exe.config, but I'm thinking that when I run it from a job, I have to add the same config info into another config file? Any ideas anyone?

Hope the partial step forward is of use to someone...

|||

If you have configuration info, then you need some more files, as the UI host is not the same as used when scehduled.

Try dtexec.exe.config and dtshost.exe.config, also in C:\Program Files\Microsoft SQL Server\90\DTS\binn

Custom Functions Available To Linked Databases

I have a linked table in SQL Server to an Oracle database. Thinking I was
tricky and not wanting to rewrite all of my queries for oracle to sql server
(yes I have to do the same application from two different servers one with
direct access to oracle and the other as a linked db in sql server) I wrote a
few of the more basic functions that I use that are oracle specific so that I
would not need to change my code much between servers. Stuff like TO_DATE,
TO_CHAR, NVL, and INITCAP anyway when connected with sql query analyzer the
queries work like a champ when called from the web server they crap out and
say that the function doesn't exist (after trying to process which before I
wrote them didn't happen only said not recognized) anyway I guess the point
of all this rambling is to ask if there is a way to make the custom functions
available to ADO on the webserver when calling that server.They are available if you are using Openquery - it's just a
pass through query to Oracle. If you are using 4 part naming
to access the linked server from your Web server, your
Oracle specific functions won't work - those need to be just
done in T-SQL. Check books online under Openquery function.
-Sue
On Mon, 8 Nov 2004 14:49:09 -0800, "Jason Burr"
<JasonBurr@.discussions.microsoft.com> wrote:
>I have a linked table in SQL Server to an Oracle database. Thinking I was
>tricky and not wanting to rewrite all of my queries for oracle to sql server
>(yes I have to do the same application from two different servers one with
>direct access to oracle and the other as a linked db in sql server) I wrote a
>few of the more basic functions that I use that are oracle specific so that I
>would not need to change my code much between servers. Stuff like TO_DATE,
>TO_CHAR, NVL, and INITCAP anyway when connected with sql query analyzer the
>queries work like a champ when called from the web server they crap out and
>say that the function doesn't exist (after trying to process which before I
>wrote them didn't happen only said not recognized) anyway I guess the point
>of all this rambling is to ask if there is a way to make the custom functions
>available to ADO on the webserver when calling that server.|||Sue,
You maam are a godess.
Anyway while that was a much better and easier solution to implement and
does exactly what I need I did have another question.
My original question was how to make a sql server function globaly available
(My orignal approach was writing those oracle functions as sql server
functions) They worked however I wanted to make them available to all db's so
I wouldn't have to do something like dbo.db.function(params) So is there a
way to make a function available system wide (as you may have guessed I am
not a big sql server guy)
Thanks again,
Jason
"Sue Hoegemeier" wrote:
> They are available if you are using Openquery - it's just a
> pass through query to Oracle. If you are using 4 part naming
> to access the linked server from your Web server, your
> Oracle specific functions won't work - those need to be just
> done in T-SQL. Check books online under Openquery function.
> -Sue
> On Mon, 8 Nov 2004 14:49:09 -0800, "Jason Burr"
> <JasonBurr@.discussions.microsoft.com> wrote:
> >I have a linked table in SQL Server to an Oracle database. Thinking I was
> >tricky and not wanting to rewrite all of my queries for oracle to sql server
> >(yes I have to do the same application from two different servers one with
> >direct access to oracle and the other as a linked db in sql server) I wrote a
> >few of the more basic functions that I use that are oracle specific so that I
> >would not need to change my code much between servers. Stuff like TO_DATE,
> >TO_CHAR, NVL, and INITCAP anyway when connected with sql query analyzer the
> >queries work like a champ when called from the web server they crap out and
> >say that the function doesn't exist (after trying to process which before I
> >wrote them didn't happen only said not recognized) anyway I guess the point
> >of all this rambling is to ask if there is a way to make the custom functions
> >available to ADO on the webserver when calling that server.
>|||Jason,
Not any supported way with functions - there are some hacks
but it's unsupported and not recommended.
Qualifying objects is not a bad thing. Scalar UDFs require
calling with a two part name anyway with owner.function.
If wanting them to be global is related to setting up your
security or having them in a central location, you could
create another database for such objects. You'd still call
them by qualifying with database.owner.function.
-Sue
On Tue, 9 Nov 2004 07:20:02 -0800, "Jason Burr"
<JasonBurr@.discussions.microsoft.com> wrote:
>Sue,
>You maam are a godess.
>Anyway while that was a much better and easier solution to implement and
>does exactly what I need I did have another question.
>My original question was how to make a sql server function globaly available
>(My orignal approach was writing those oracle functions as sql server
>functions) They worked however I wanted to make them available to all db's so
>I wouldn't have to do something like dbo.db.function(params) So is there a
>way to make a function available system wide (as you may have guessed I am
>not a big sql server guy)
>Thanks again,
>Jason
>"Sue Hoegemeier" wrote:
>> They are available if you are using Openquery - it's just a
>> pass through query to Oracle. If you are using 4 part naming
>> to access the linked server from your Web server, your
>> Oracle specific functions won't work - those need to be just
>> done in T-SQL. Check books online under Openquery function.
>> -Sue
>> On Mon, 8 Nov 2004 14:49:09 -0800, "Jason Burr"
>> <JasonBurr@.discussions.microsoft.com> wrote:
>> >I have a linked table in SQL Server to an Oracle database. Thinking I was
>> >tricky and not wanting to rewrite all of my queries for oracle to sql server
>> >(yes I have to do the same application from two different servers one with
>> >direct access to oracle and the other as a linked db in sql server) I wrote a
>> >few of the more basic functions that I use that are oracle specific so that I
>> >would not need to change my code much between servers. Stuff like TO_DATE,
>> >TO_CHAR, NVL, and INITCAP anyway when connected with sql query analyzer the
>> >queries work like a champ when called from the web server they crap out and
>> >say that the function doesn't exist (after trying to process which before I
>> >wrote them didn't happen only said not recognized) anyway I guess the point
>> >of all this rambling is to ask if there is a way to make the custom functions
>> >available to ADO on the webserver when calling that server.
>>|||Thanks again Sue. I was worried that was the case. Thanks for confirming.
"Sue Hoegemeier" wrote:
> Jason,
> Not any supported way with functions - there are some hacks
> but it's unsupported and not recommended.
> Qualifying objects is not a bad thing. Scalar UDFs require
> calling with a two part name anyway with owner.function.
> If wanting them to be global is related to setting up your
> security or having them in a central location, you could
> create another database for such objects. You'd still call
> them by qualifying with database.owner.function.
> -Sue
> On Tue, 9 Nov 2004 07:20:02 -0800, "Jason Burr"
> <JasonBurr@.discussions.microsoft.com> wrote:
> >Sue,
> >
> >You maam are a godess.
> >
> >Anyway while that was a much better and easier solution to implement and
> >does exactly what I need I did have another question.
> >
> >My original question was how to make a sql server function globaly available
> >(My orignal approach was writing those oracle functions as sql server
> >functions) They worked however I wanted to make them available to all db's so
> >I wouldn't have to do something like dbo.db.function(params) So is there a
> >way to make a function available system wide (as you may have guessed I am
> >not a big sql server guy)
> >
> >Thanks again,
> >
> >Jason
> >
> >"Sue Hoegemeier" wrote:
> >
> >> They are available if you are using Openquery - it's just a
> >> pass through query to Oracle. If you are using 4 part naming
> >> to access the linked server from your Web server, your
> >> Oracle specific functions won't work - those need to be just
> >> done in T-SQL. Check books online under Openquery function.
> >>
> >> -Sue
> >>
> >> On Mon, 8 Nov 2004 14:49:09 -0800, "Jason Burr"
> >> <JasonBurr@.discussions.microsoft.com> wrote:
> >>
> >> >I have a linked table in SQL Server to an Oracle database. Thinking I was
> >> >tricky and not wanting to rewrite all of my queries for oracle to sql server
> >> >(yes I have to do the same application from two different servers one with
> >> >direct access to oracle and the other as a linked db in sql server) I wrote a
> >> >few of the more basic functions that I use that are oracle specific so that I
> >> >would not need to change my code much between servers. Stuff like TO_DATE,
> >> >TO_CHAR, NVL, and INITCAP anyway when connected with sql query analyzer the
> >> >queries work like a champ when called from the web server they crap out and
> >> >say that the function doesn't exist (after trying to process which before I
> >> >wrote them didn't happen only said not recognized) anyway I guess the point
> >> >of all this rambling is to ask if there is a way to make the custom functions
> >> >available to ADO on the webserver when calling that server.
> >>
> >>
>