Showing posts with label visualbasic. Show all posts
Showing posts with label visualbasic. Show all posts

Tuesday, March 20, 2012

Active X for monitoring a Pull subscription, which one?

Hi all,
I should program a small VisualBasic program for monitoring the status of
the subscription. It is a Pull anonymous subscription to a Snapshot
publication. It is supposed to run at the subscriber, a laptop PC, and
provide info to an human about:
-Wheter the distributor is reachable/available
-The last successful synchronization.
-If the synch is running, the approx time to the end.
I've been browsing around the SQL Replication ActiveX controls available,
but the samples on the Books on Line are focused on how to use the controls
to create the replication, I can't find a sample or indications on how to
monitor a pull subscription at the subscriber. Where can I find some samples
about it? Which control I need?
Thanks in advance
Faustino Dina
If my email address starts with two 'f'
drop the first 'f' when mailing me.
You are probably best to either use the status event or to query the
particular agent's history table in the distribution database for a pull
subscription.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"faustino Dina" <ffdina@.matusa.com.mx> wrote in message
news:ermC9JomEHA.748@.TK2MSFTNGP15.phx.gbl...
> Hi all,
> I should program a small VisualBasic program for monitoring the status of
> the subscription. It is a Pull anonymous subscription to a Snapshot
> publication. It is supposed to run at the subscriber, a laptop PC, and
> provide info to an human about:
> -Wheter the distributor is reachable/available
> -The last successful synchronization.
> -If the synch is running, the approx time to the end.
> I've been browsing around the SQL Replication ActiveX controls available,
> but the samples on the Books on Line are focused on how to use the
controls
> to create the replication, I can't find a sample or indications on how to
> monitor a pull subscription at the subscriber. Where can I find some
samples
> about it? Which control I need?
> Thanks in advance
> --
> Faustino Dina
> If my email address starts with two 'f'
> drop the first 'f' when mailing me.
>
|||> You are probably best to either use the status event or to query the
> particular agent's history table in the distribution database for a pull
> subscription.
Yes, ideally I'll show a Progress bar feeded by the status event of one of
the replication controls. Since my publications is a Snapshot one, and
subscription is anonymous pull, I suppose I should use the SqlDistribution
Control but the documentation states it should be used only for
transactional replication so I'm not sure about which other control to use.
The Snapshot control states it should be used for creating snapshot, it is
not the case. The snapshot is already created and ready at the distributor.
And the Merge control is useless on the Snapshot publication I think.

Friday, February 24, 2012

Accessing the sample database in Visual Basic .net sqlDataAdapter

I need some help with accessing the sample databases with
the SqlDataAdapter.
After double-clicking on SqlDataAdapter in Visual
Basic .net. I click on new connection and choose
Microsoft Ole DB Provider for SQL Server as the
provider. Then under the connection tab, I enter (local)
as the server name. And Choose Use Windows NT Inegrated
Security. Then under databases in the server, only
master, model, msdb, and tempdb show up. The sample
databases Northwind and pubs don't show up, as well as
the database which I created called Project.
In the SQL Server Enterprise Manager, under Console Root -
> Microsoft SQL Server -> SQL Server Group -> CR304216-
A\Project[WindowsNT] -> Databases
I see master, model, msdb, Northwind, Project, pubs, and
tempdb.
So, why don't I see Northwind, Project, and pubs in the
sqlDataAdapter console?Hi, Sabrina!
I'm fairly new to VB.net, but I'm working hard at learning it each day.
Anyway, have you tried using the "sa" user name (or better yet... just the u
ser name and password to one of the databases you have access to)? I tend t
o not use the Windows security and go with the user name and password provid
ed for SQL Server instead (
I seem to have problems getting connections the other way).
I would try that and see what happens.
Hope that helps.
Rick
-- Sabrina wrote: --
I need some help with accessing the sample databases with
the SqlDataAdapter.
After double-clicking on SqlDataAdapter in Visual
Basic .net. I click on new connection and choose
Microsoft Ole DB Provider for SQL Server as the
provider. Then under the connection tab, I enter (local)
as the server name. And Choose Use Windows NT Inegrated
Security. Then under databases in the server, only
master, model, msdb, and tempdb show up. The sample
databases Northwind and pubs don't show up, as well as
the database which I created called Project.
In the SQL Server Enterprise Manager, under Console Root -
> Microsoft SQL Server -> SQL Server Group -> CR304216-
A\Project[WindowsNT] -> Databases
I see master, model, msdb, Northwind, Project, pubs, and
tempdb.
So, why don't I see Northwind, Project, and pubs in the
sqlDataAdapter console?