This property specifies the data source name (DSN) of the database.
Syntax
ReplicationEventSinkConfig.DataSource
Remarks
This property is used only by the OLEDB event sink, and is required for the local database event sinks, such as CRSLocalEvents. CRSLocalEvents is the only event sink using this property.
You must have Site Server Publishing administrator privileges on the server to set this property.
Example
The following example displays the DSN for the current event sinks.
Option Explicit
On Error Resume Next
const CRS_ERROR_NO_MORE_ITEMS = 0&80003B17
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim EvSink
dim Iterator
Iterator = 0
do while True
'Clear any error text
Err.Clear
'Get an event sink
set EvSink = ReplServer.EnumEventSinks(Iterator)
'Quit if empty object returned (no more instances)
if IsEmpty(EvSink) then exit do
'Quit if "No more items" error
dim ReplError
ReplError = Err.Number
if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do
Wscript.Echo "The " & EvSink.Name & " has DNS: " & EvSink.DNS
Loop
'Release objects
set EvSink = Nothing
set ReplServer = Nothing
See Also
ReplicationServer.AddEventSink, ReplicationServer.EnumEventSinks