Pages

Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Monday, 10 February 2014

Purge log records–excluding audit level logging

 

Some time back, I wrote blog to delete log records older than 15 days from Genesys log database (here) From our support team, we had request to delete log records older than 15 days but want to retain audit level logging for 90 days.

To achieve this, add category filter in the purge query as below

-- To delete attribute records which doesn't have parent record
delete from G_LOG_ATTRS 
where LRID not in (select G_LOG_MESSAGES.ID from G_LOG_MESSAGES)
    
-- To delete log attribute records older than 90 days excluding audit level logging
delete from G_LOG_ATTRS where LRID in 
(select G_LOG_MESSAGES.ID from G_LOG_MESSAGES where TIMEGENERATED < DATEADD(DAY, -90, GETDATE())and CATEGORY = 0)
    
-- To delete log records older than 90 days excluding 90 days
delete from G_LOG_MESSAGES 
where TIMEGENERATED < DATEADD(DAY, -90, GETDATE())
and CATEGORY = 0

Monday, 11 November 2013

How to send email notification using CCPulse+?

 

  • Create threshold using CCPulse+ threshold wizard
  • Download 'vbSendEmail.dll' from http://www.freevbcode.com/ShowCode.Asp?ID=109 and copy it in CCPulse+ folder (typically, 'GCTI\CCPulse+')
  • Using command prompt, navigate to CCPulse+ folder and register dll using the following command
regsvr32 vbSendMail.dll
  • Create action script as below
   1: Set poSendMail = CreateObject("vbSendMail.clsSendMail")
   2: poSendMail.SMTPHost = "<your smtp server here>"
   3: poSendMail.From = "<from Address>"
   4: poSendMail.FromDisplayName = "<From>"
   5: poSendMail.Recipient = "<To Address>"
   6: poSendMail.RecipientDisplayName = "<To Name>"
   7: poSendMail.ReplyToAddress = "<Reply Address>"
   8: poSendMail.Subject = "CCPulse Notification"
   9: poSendMail.Attachment = ""
  10: poSendMail.Message = "<your message>"
  11: poSendMail.Send
  12: Set poSendMail = Nothing

Saturday, 2 November 2013

How to uninstall applications in MAC?



Uninstalling applications in mac is very different than windows. Although, in most cases, simply deleting application to trash, it may leave preferences and application files - depending on your application, it may be few KB to GB size, you may want to completely remove application and all associated files.

To manually remove an application and all associated files:
  • Launch Activity Monitor and change "My Processes" at the top to "All Processes", then make sure the app you want to remove is not running. If it is, quit the process before proceeding.
  • Launch Finder and search for the app name (hopefully unique, such as Skype)
  • You can narrow the search to specific folders or search your whole Mac
  • Searching "File Name" vs "Contents" usually provides better results.
  • Click the + button below the search term to add criteria
  • Click the search criteria drop-down and select "Other...", then "System files"
  • Click the "don't include" and change to "include"
  • Sort by name, kind, date, etc. to identify components of the app, such as folders, .plist files, cache files. etc.
  • Delete all files and folders related to the app.
  • Don't empty your Trash until you've determined that everything is working OK, in case you need to restore something you deleted by accident.
  • A reboot might be necessary to completely remove some apps.

Adapted from a forum post by GGJstudios

Wednesday, 30 October 2013

Know which process locked a file

Due to ICON issue, I need to unlock .pq file and want to ensure that it is not locked by any other process. SysInternals tool (Process Explorer) is really helpful to find which processes are having lock on the file
  • Download process explorer from Microsoft Site and run application
  • Click 'Find' menu and choose 'Find Handle or DLL'
  • Type the file name. In my case, it was icon_531.pq and click Search button
  • Search results will show the process, process id and application path having handle on the file

Important Icon Alarms



I listed important ICON alarms below to be configured in every environment to reduce data loss for reporting application

Detect Event Alarm Condition Description
09-25005 ICON_DATABASE_QUEUE_ERROR Database queue [ID]: database error received: status [errnum], description: [errtxt]
[ID]
Identifier of the database queue. One of the following values: CFG, GCC, GLS, GOS, or GUD.
[errnum]
The database error status number as reported by Database Server.
[errtxt]
The database error description as reported by Database Server
Recommended Actions:
The error may be triggered by internal conditions on your SQL Server, such as temporary unavailability or exhaustion of the disk space. Interaction Concentrator will try to resubmit failed transactions until SQL Server returns a positive response.



09-25012 ICON_PERSISTENT_QUEUE_ERROR Persistent Queue operation error: [errtxt]
[errtxt]
Persistent queue error description.
An error occurred during the operations with the persistent queue
Recommended Actions:
Interaction Concentrator will rename the database that caused an error and recreate a new one. The problem database file should be sent to Genesys Technical Support.

09-25131 ICON_CONFIG_SYNCH_REQUIRED Configuration data inconsistency is detected; reason: [reason]. Waiting for customer command....
[reason]
Specific details as to why data inconsistency is suspected.
Indicates that Interaction Concentrator has detected a discrepancy between the configuration data in Interaction Database (IDB) and Configuration Database
Recommended Actions:
Use the Interaction Concentrator resynchronization functionality (in particular, the start-cfg-sync configuration option) to synchronize the configuration data in IDB with the data in Configuration Database.  Make sure the resynchronization process is complete before you run your ETL engine to extract data from IDB
Cancel Event is 09-25017




09-25024 ICON_PRESERVE_ERROR ICON cannot preserve or store the data: [errtxt]
[errtxt]
Specific details regarding the error
Interaction Concentrator cannot preserve or store the data. There are many events that could cause ICON to generate this error, including operating systems errors, disk full, insufficient memory, system queue corruption, or internal software errors. Manual intervention is required
Recommended Actions:
  1. Check for and correct any operating system errors.
  2. Check that your disk is not full.
  3. If either step does not resolve the problem, contact Genesys Technical Support for investigation of possible internal error


09-25025 ICON_STORAGE_THRESHOLD_REACHED Persistent storage backlog threshold reached: [errtxt]
[errtxt]
Specific details regarding the backlog
Using the pq-backlog-alarm-threshold configuration option, you have defined a threshold that ICON is to observe when it is unable to write records to IDB. If this event appears, this limit has been reached and ICON can no longer backlog records to memory.
It is common for ICON to log this event following 09-25024
Recommended Actions:
One of the configured backlog thresholds of persistent storage has been reached.
  1. Check that threshold parameter is properly set.
  2. Check the ICON and related T-Server logs for errors.
  3. Correct any problems that you discover.
The amount of time it takes to clear the backlog depends on how much data from the abnormal condition must be flushed.
Cancel Event is 09-25026





Thursday, 10 October 2013

Synchronize Configuration DB for ICON Datasource

 

This is interesting and saved hours for me.

During migration or upgrade of ICON components, as ICON application is not running, it will not be collecting configuration changes from the environment. So, once the installation is completed, we need to resync configuration database for accurate reporting.

Follow the below procedure to re-sync your Config IDB with configuration server

  • Verify that the ICON application with the configuration option role=cfg is started.
  • In Configuration Manager, set the start-cfg-sync option under callconentrator section from -1 to 0 in the Application Properties window of this ICON application.
  • Click OK in the option properties window.
  • Click Apply in the ICON Application Properties window to enable this setting.
  • Change the option value to 1.
  • Click OK in the option properties window.
  • Click Apply in the ICON Application Properties window to enable this new setting.

Verify Status from log and Database

When ICON retrieves from Configuration Server all the data necessary for resynchronization, ICON generates the following Standard-level log event:

09-25017 Configuration objects are reloaded in IDB

Run the following query against your configuration IDB

   1: select eventid from G_SYNC_CONTROL where providertag = 5

If the above statement returns no records or eventID = 0, the resynchronization is still in progress.


If the above statement returns a non-zero value of eventID, the resynchronization is completed, and it is safe to run your GIM process

Monday, 16 September 2013

How to find port number of SQL Server instance?


  • Click Start > All Programs > Microsoft SQL Server <2005 / 2008 / 2012> > Configuration Tools >SQL Server Configuration Manager
  • Go to SQL Server Configuration Manager > SQL Server Network Configuration >Protocols for <Instance Name>
  • Right Click on TCP/IP and select Properties




  • In TCP/IP Properties dialog box, go to IP Addresses tab and scroll down to IPAll group.


  • If SQL Server if configured to run on a static port it will be available in TCP Port textbox. If it is configured on dynamic port then current port will be available in TCP Dynamic Ports textbox

Sunday, 27 January 2013

Configure default IVR profile

 

It is best practice to configure default IVR profile in GVP environment, in case, if your regular DN-Profile mapping is not happening. This post will explain step by step instructions to configure default profile

  • select your' ‘tenant’ object – in most cases, it is ‘Resources’ – under Administrator –> Provisioning –> Tenants
  • Create section gvp.general in options tab and update following values
    • name : default-application, value : DefaultApp (Default IVR Profile application name)
    • name : service-type, value : voicexml
  • Click ‘Save & Close’ to save settings

Tuesday, 8 January 2013

Easy way to find default routed calls in URS log

Whenever URS default routes calls, it will be logged with ‘EventRouteUsed(strange)’

You can simply search for this string to identify call flows which resulted in default route or use ‘find in files’ option from text editor to calculate number of calls which were default routed. Smile

Monday, 7 January 2013

Deleting Log records from Log Database


As we all know, Genesys applications can be configured to store log records in database. Unfortunately, there is no automatic maintenance option and have to purge data either manually or schedule script for this.

Manual Process

You can use ‘Log Database Maintenance Wizard’ from SCI to maintain database. If there are large number of records in database, GUI get stuck and many times, have to kill it. And you don't want to do this everyday, don't you.

Schedule it

You can use steps below to automate the process. But, this is manual process and was looking to automate it. Fortunately, we don’t have to dig deep for this as SQL scripts are available from the wizard itself. You can easily find that log records are stored in two tables as below
  • G_LOG_MESSAGES
  • G_LOG_ATTRS
and to delete logs which are older than 15 days, use script below

   1: delete from G_LOG_ATTRS where LRID not in (select G_LOG_MESSAGES.ID from G_LOG_MESSAGES)

   2:  

   3: delete from G_LOG_ATTRS where LRID in (select G_LOG_MESSAGES.ID from G_LOG_MESSAGES where TIMEGENERATED < DATEADD(DAY, -15, GETDATE()))

   4:  

   5: delete from G_LOG_MESSAGES where TIMEGENERATED < DATEADD(DAY, -15, GETDATE())


You need to run this in the same order as above and recommend to schedule to run every 24 hours. You can configure this as SQL Server Agent job or run this sql as scheduled task from windows.

Tuesday, 13 November 2012

How to enable logging in Genesys Administrator?

 

Genesys Administrator tracing can be enabled by changing the following in the <log4net> section (of Web.Config):

<log4net>
        <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
            <file value="logfile"/>
            <appendToFile value="true"/>
            <rollingStyle value="Composite"/>
            <datePattern value="yyyyMMdd"/>
            <!-- gst: append following to add .txt to file name:  .\\tx\\t -->
            <maxSizeRollBackups value="10"/>
            <maximumFileSize value="1MB"/>
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
            </layout>
        </appender>
        <!-- gst added -->
        <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
            <layout type="log4net.Layout.PatternLayout">
                <!--ConversionPattern value="%d [%t] %-5p %c - %m [%P{InstanceId}]%n" / -->
                <ConversionPattern value="%message%newline"/>
            </layout>
        </appender>

<root>
   <level value="INFO"/>    
  <!-- appender-ref ref="RollingLogFileAppender"/ -->
   <appender-ref ref="TraceAppender"/>
  </root>

to:

<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="galog.log"/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<datePattern value="yyyyMMdd"/>
<!-- gst: append following to add .txt to file name: .\\tx\\t -->
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1MB"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
</layout>
</appender>
<!-- gst added -->
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<!--ConversionPattern value="%d [%t] %-5p %c - %m [%P{InstanceId}]%n" / -->
<ConversionPattern value="%message%newline"/>
</layout>
</appender>

  <root>
   <level value="DEBUG"/>
   <appender-ref ref="RollingLogFileAppender"/>

   <appender-ref ref="TraceAppender"/>
  </root>

For the above changes to take effect, you need to logout and login. You can now see file “galog.log” will be created in the same installation path as Genesys Administrator

Saturday, 6 August 2011

Restore Windows State from minimized to previous state

To restore windows state from minimized to previous state, use the following

SendMessage(docView.Handle, WM_SYSCOMMAND, SC_RESTORE, 0);

 

Monday, 6 December 2010

Outlook 2003–Small/Large Text when replying

It is such annoying..

Yesterday, accidently I changed text size when responding to email in Outlook 2003. Font size went really small and was very difficult to read/write the messages. Unfortunately, it is not easy to change it and with few help from Microsoft posts, finally got the solution and listed simple one below.

  • In Outlook 2003, Select File –> New –> Mail Message
  • Go to View –> Zoom
  • Change percentage value to 100%

That’s it. you will back to Normal font size and your work can continue normally.

Sunday, 17 October 2010

How to set AutoComplete for Textbox in VB.net

Ever wondered how to set up auto complete for Textbox and Combo box in VB.net.  In Windows Form 2.0 and higher, some of the controls support this feature including the combo box and textbox controls. By using these feature, we can easily build auto completion functionality and here is the sample code for text box control

 

Dim Companies As AutoCompleteStringCollection
Companies = New AutoCompleteStringCollection
Companies.Add(“Ferrari”)

Companies.Add(“Ferrari2”)
txtAuto.AutoCompleteMode = AutoCompleteMode.Suggest
txtAuto.AutoCompleteSource = AutoCompleteSource.CustomSource
txtAuto.AutoCompleteCustomSource = Companies

Simple and very useful end user experience…

Thursday, 19 August 2010

How to register Hot Keys in VB.net

Code sample: Register multiple hotkeys such as Alt+D, Alt+C, etc.

Imports System.Runtime.InteropServices

Public Class Form1

Public Const MOD_ALT As Integer = &H1 'Alt key
Public Const WM_HOTKEY As Integer = &H312

<DllImport("User32.dll")> _
Public Shared Function RegisterHotKey(ByVal hwnd As IntPtr, _
ByVal id As Integer, ByVal fsModifiers As Integer, _
ByVal vk As Integer) As Integer
End Function

<DllImport("User32.dll")> _
Public Shared Function UnregisterHotKey(ByVal hwnd As IntPtr, _
ByVal id As Integer) As Integer
End Function

Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
RegisterHotKey(Me.Handle, 100, MOD_ALT, Keys.D)
RegisterHotKey(Me.Handle, 200, MOD_ALT, Keys.C)
End Sub

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_HOTKEY Then
Dim id As IntPtr = m.WParam
Select Case (id.ToString)
Case "100"
MessageBox.Show("You pressed ALT+D key combination")
Case "200"
MessageBox.Show("You pressed ALT+C key combination")
End Select
End If
MyBase.WndProc(m)
End Sub

Private Sub Form1_FormClosing(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.FormClosingEventArgs) _
Handles MyBase.FormClosing
UnregisterHotKey(Me.Handle, 100)
UnregisterHotKey(Me.Handle, 200)
End Sub

End Class

Tuesday, 29 June 2010

How to view line numbers in VB.NET

Remember line numbers ??? Long time ago, they were used to branch them with a ‘Go To’ statement. And it is still available with Visual Studio 2008 and pretty useful for error handling too…

For example, a lot of error messages give you specific line numbers in your code to use to find the errors. Trying to count down the page manually can be pretty tedious.

To enable line numbers, go to

Tools menu item > Options > Text Editor > Basic > General

Click the checkbox in front of "Line Numbers". It should do it…

Friday, 25 June 2010

Stopping a form closing using vb.net

Quick and useful tip..

 

Private Sub MyForm_Closing(ByVal sender As System.Object, ByVal e As _
            System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Try
   Select Case MessageBox.Show("Are you sure you want to close this window?", _
      "Your application", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
    Case MsgBoxResult.Yes
     'Do Nothing
    Case MsgBoxResult.No
     e.Cancel = True
   End Select
Catch ee As Exception
  Throw ee
End Try
End Sub