Showing posts with label external. Show all posts
Showing posts with label external. Show all posts

Tuesday, March 27, 2012

Accessing Initiating Event + Data From Existing External DB

Hello,
I have been exploring NS and I would like to use it as a rudimentary transfer tool. I have an existing database table from where I would to transfer a record to subscribers and then possibly move the records out of that table.

1. How do I set up the ..\SubscriptionClasses\SubscriptionClass\EventRules\EventRule so that it reads from another database? The TSQL Statement should probably work accross databases?

2. As I scroll through the sample ADFs I would think that ..\Providers\HostedProvider should also change too to another type.

Thank you very much,

Lubomir

Hi Lubomir -

Using the SQL Server Event Provider, you can collect events from tables in other databases or even other instances of SQL Server.

Configure the HostedProvider node to use the SQL Server Event Provider. Use the EventsQuery element to enter the T-SQL code that you will use to recognize new rows (or events of interest) in the table. Here's a sample.

<HostedProvider>
<ProviderName>SqlPrEP</ProviderName>
<ClassName>SQLProvider</ClassName>
<SystemName>%_NSSystem_%</SystemName>
<Schedule>
<Interval>P0DT00H00M60S</Interval>
</Schedule>
<Arguments>
<Argument>
<Name>EventsQuery</Name>
<Value>SELECT rowId, col1, col2, col3 FROM AnotherDb.dbo.vwCurrentRows WHERE rowId NOT IN (SELECT rowId FROM MyChron)</Value>
</Argument>
<Argument>
<Name>EventClassName</Name>
<Value>PressRelease</Value>
</Argument>
</Arguments>
</HostedProvider>

Next you can use the EventRule node of the SubscriptionClass to define your match rule; that is to write the T-SQL code that matches the events that you've collected to those subscribers who are interested in your events.

You EventRule would look something like this.

<EventRule>
<EventClassName>PressRelease</EventClassName>
<RuleName>PrEventRule</RuleName>
<Action>
INSERT INTO PrNotifications(
SubscriberId,
DeviceName,
SubscriberLocale,
col1,
col2)
SELECT
s.SubscriberId,
s.SubscriberDeviceName,
s.SubscriberLocale,
e.col1,
e.col2
FROM
PressRelease e,
PrSubscription s
WHERE
e.col3 = s.col3
</Action>
<ActionTimeout>P0DT00H00M45S</ActionTimeout>
</EventRule>

HTH...

Joe

Sunday, March 25, 2012

accessing external webservice or webpage from SQL 2005

Is it possible to access a webservice from within SQL 2005?

What I am looking to do is place a trigger on a specific table, and detect if a specific column is being updated. If it is, I want to launch a robust process that does x, y and z. Something like this:

1) record is updated indicating that an account is closed.

2) SQL launched a webservice/ aspx page that builds an HTML email template and then mail it.

thanks!

SQL Server 2005 does have XML web service support. Seehttp://msdn2.microsoft.com/en-us/library/ms191274.aspx.|||

Wow, thanks for the speedy reply. The documentation behind the link you sent seems to refer to SQL server fielding SOAP requests and "listening" to and delivering data, where the SQL server is processing the request.

But is the opposite possible? SQL calling another webservice?

Accessing external data from SQL Server

Hi,
I have a Sybase dataserver containing lots of (huge) tables that I
would like to access from SQL Server (two different applications,
using two different datasources, now want to talk to each other). MS
Access has a feature for 'linking' external data. Can I do similar
stuff in SQL Server?
Basically, I am trying to avoid having to duplicate the data in both
the dataservers and worry about keeping them in sync.

Regards,
Tanveer<arshad.tanveer@.gmail.comwrote in message
news:1174488978.618140.16840@.e65g2000hsc.googlegro ups.com...

Quote:

Originally Posted by

Hi,
I have a Sybase dataserver containing lots of (huge) tables that I
would like to access from SQL Server (two different applications,
using two different datasources, now want to talk to each other). MS
Access has a feature for 'linking' external data. Can I do similar
stuff in SQL Server?
Basically, I am trying to avoid having to duplicate the data in both
the dataservers and worry about keeping them in sync.
>
Regards,
Tanveer
>


Yes, look up linked servers in Books-Online. I haven't done this with
Sybase but would be surprised if you can't.

--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com|||You can , but I think that MS SQL 2000 doesn't come with the drivers , you
have to install the SYBASE odbc drivers

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com
<arshad.tanveer@.gmail.comwrote in message
news:1174488978.618140.16840@.e65g2000hsc.googlegro ups.com...

Quote:

Originally Posted by

Hi,
I have a Sybase dataserver containing lots of (huge) tables that I
would like to access from SQL Server (two different applications,
using two different datasources, now want to talk to each other). MS
Access has a feature for 'linking' external data. Can I do similar
stuff in SQL Server?
Basically, I am trying to avoid having to duplicate the data in both
the dataservers and worry about keeping them in sync.
>
Regards,
Tanveer
>

|||On Mar 22, 12:51 am, "Jack Vamvas" <DEL_TO_RE...@.del.comwrote:

Quote:

Originally Posted by

You can , but I think that MS SQL 2000 doesn't come with the drivers , you
have to install the SYBASE odbc drivers
>
--
>
Jack Vamvas
___________________________________
Advertise your IT vacancies for free at -http://www.ITjobfeed.com
>
<arshad.tanv...@.gmail.comwrote in message
>
news:1174488978.618140.16840@.e65g2000hsc.googlegro ups.com...
>

Quote:

Originally Posted by

Hi,
I have a Sybase dataserver containing lots of (huge) tables that I
would like to access from SQL Server (two different applications,
using two different datasources, now want to talk to each other). MS
Access has a feature for 'linking' external data. Can I do similar
stuff in SQL Server?
Basically, I am trying to avoid having to duplicate the data in both
the dataservers and worry about keeping them in sync.


>

Quote:

Originally Posted by

Regards,
Tanveer


I already have the Sybase SQL drivers installed. Thanks a bunch for
your help.

Thursday, February 16, 2012

Access java webservices from CLR function on sql server in DMZ.

Hello,
First excuse me for my bad english.
I have developed a sql server funtion CLR calling external webservices (java
).
Everything works perfectly when i execute the function on my test server.
But i need to deploy it on my production sql server 2005, but the cluster is
in DMZ (private network), and from it i don't have a direct access on
internet.
What is the best secure solution :
- NAT?
- install a sql express on the web server, and connect the cluster on it?
thanks for your response.
DraganNo response for me doesn't matter
I found my answer alone. For everyone who wan't to use a CLR UDF table
fonction who get some data from distant web service, and where the sql serve
r
was in private network, behind a webserver simply mail me
Have a nice weekend
"Draggi" wrote:

> Hello,
> First excuse me for my bad english.
> I have developed a sql server funtion CLR calling external webservices (ja
va).
> Everything works perfectly when i execute the function on my test server.
> But i need to deploy it on my production sql server 2005, but the cluster
is
> in DMZ (private network), and from it i don't have a direct access on
> internet.
> What is the best secure solution :
> - NAT?
> - install a sql express on the web server, and connect the cluster on it?
> thanks for your response.
> Dragan|||> I found my answer alone. For everyone who wan't to use a CLR UDF table
> fonction who get some data from distant web service, and where the sql
> server
> was in private network, behind a webserver simply mail me
Why not post your solution here so that others with the same problem can
easily find the answer?
Hope this helps.
Dan Guzman
SQL Server MVP
"Draggi" <Draggi@.discussions.microsoft.com> wrote in message
news:08984EC0-25A3-4E42-BB63-8E291C275BF1@.microsoft.com...[vbcol=seagreen]
> No response for me doesn't matter
> I found my answer alone. For everyone who wan't to use a CLR UDF table
> fonction who get some data from distant web service, and where the sql
> server
> was in private network, behind a webserver simply mail me
> Have a nice weekend
>
> "Draggi" wrote:
>