Tuesday, March 28, 2017

Open Text DM API Login Failed For Library

login function used to login dm Library

Public Function HB_Login(ByVal library As String, ByVal username As String, ByVal password As String) As String

        Dim DST As String
        Try

            plgn = New PCDLogin()
            plgn.AddLogin(0, library, username, password)
            plgn.Execute()
            If plgn.ErrNumber <> 0 Then
                plgn = Nothing
                Return "ERROR"
            End If
            DST = plgn.GetDST
            plgn = Nothing

        Catch ex As Exception
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex)
        End Try
        Return DST
    End Function



Error Message (From Debugging )
Cannot load the DM Server interface.  The DM server may not be started.
plgn.ErrNumber -2147220409

Solution:

the problem was in Network connection for DCom Protocol - may be the antivirus or firewall program block the protocol for DM Connection Wizard.

when i changed the Connection to DM Server to Http Protocol The code running successfully.

i

Monday, March 27, 2017

sql server truncate log script

 use ttt
 go
 sp_removedbreplication
    go
    alter database ttt set recovery simple
    go
    dbcc shrinkfile('ttt_log',200)
    go
    alter database ttt set recovery FUll
    go