Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Friday, March 30, 2012

query about publisher or subscriber

What is the easy command (if any) to see if the server is a publisher or
a subscriber in a replication environment?
Darin
*** Sent via Developersdex http://www.codecomments.com ***
Hi Darin,
In your Publication database...
select subscriber_type, subscriber_server
from sysmergesubscriptions
order by subscriber_type, subscriber_server
subscriber_type:
1 - Publisher
2 - Subscriber
|||Hi Darin,
In your Publication database...
select subscriber_type, subscriber_server
from sysmergesubscriptions
order by subscriber_type, subscriber_server
subscriber_type:
1 - Publisher
2 - Subscriber
|||issue an sp_helpdistpublisher or sp_helpsubscriberinfo
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Darin" <darin_nospam@.nospamever> wrote in message
news:eC92oo9BGHA.2704@.TK2MSFTNGP15.phx.gbl...
> What is the easy command (if any) to see if the server is a publisher or
> a subscriber in a replication environment?
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***

Wednesday, March 21, 2012

Queries using tables from diffrent Databases or SQL instances

Hello,

I am new in SSIS.

I am using an OLEDB source and setted as SQL Command.

The Query is a JOIN between different databases.

How can I make the QUERY with different source (different databases or SQL Servers)?

I mean, any solution is OK, the important is to make queries against different databases with SSIS.

Thank

You can always use two or more OLE DB sources and then use a union all or Merge Join transformations.|||

As Phil wrote in the previous post, you can add several OLEDB sources or others sources and join the data adding a UNION ALL or MERGE JOIN.

In merge Join the input data must be sorted and could ne joined by LEFT or RIGHT.

Regards!

|||

Thank|||

If you have to use an Execute SQL Task, you can do this by creating Linked servers, it can be SQL server or not.

Then use fully qualified names.

I use this to compare tables content side by side accross similar servers.

i.e.

Select s1.ColumnA as Server1_Status, s2.ColumnA as Server2_Status

From Server1 s1

Join Server2 s2 on s1.Pkey = s2.Pkey

Where Server2 is an entry in Server Objects, Linked Servers

For everything else, I use the other options like multiple pumps and Union All.

It performs better, especially when pulling from non-SQL databases.

Regards,

Philippe