📖 User Manual

Client Util App v1.3.3

User Manual

Complete guide to using the Node.js Integrated Utility Tool
Fixed path resolution for reliable portable execution

Client Util App
$ node app.js
========================================
Node.js Integrated Utility Tool
========================================
📋 Main Menu
1. Database Connection and Permission Check
2. Server Telnet Connection Check
3. Database SQL Execution
4. Configuration Management
5. Run All Checks (Batch Processing)
6. Exit
Select option (1-6):

Introduction

Client Util App v1.3.3 is a comprehensive utility tool for managing database connections, server monitoring, and SQL execution in a unified application.

Key Features of v1.3.3

🔧

Critical Bug Fix

Fixed path resolution issue - executable now works correctly regardless of execution location

Enhanced Portability

Changed from process.cwd() to path.dirname(process.execPath) for reliable resource loading

Key Features of v1.3.0

CSV Result File Generation

Automatically save SQL execution results to structured CSV files

Preprocessor Directive

Specify database connection with #DATABASE or #DB in SQL files

JSON Parameter Support

Support JSON format parameter files alongside CSV

MariaDB Support

Added MariaDB database support with MySQL-compatible driver

Installation

Prerequisites

Operating System

Windows 10+ (64-bit)

Memory

Minimum 100MB available memory

Disk Space

Approximately 150MB free space

Installation Steps

1

Download Binary Release

Download the latest binary file from GitHub releases page:

ClientUtilApp-v1.3.0-bin.zip

Download link: GitHub Releases

2

Extract Files

Extract the downloaded ZIP file to your desired location:

C:\Tools\ClientUtilApp\

After extraction, the following files are included:

  • my-node-client-util-app.exe - Executable file
  • run.bat - Batch execution file
  • config/ - Configuration directory
  • request_resources/ - CSV sample files
  • user_manual/ - User manuals
3

Run the Application

Double-click the batch file to run:

run.bat

Or execute directly from command prompt:

my-node-client-util-app.exe

Note: You can use the executable (.exe) directly without Node.js installation.

Quick Start

First Time Setup

1. Prepare CSV Files

Create your CSV files in the request_resources/ directory:

  • DB Check: Files starting with DB_ (e.g., DB_sample.csv)
  • Telnet Check: Files starting with server_ (e.g., server_sample.csv)

2. CSV File Format

For database connection checks, include these columns:

db_name,username,password,server_ip,port,db_type,db_title,select_sql,crud_test_table,crud_test_columns,crud_test_values

3. Run Your First Check

Execute the application and select option 1 for database connection check:

$ node app.js
Select option (1-6): 1

Database Connection & Permission Check

Supported Databases

🗄️

Microsoft SQL Server

Full support with connection pooling and encryption

mssql
🐬

MySQL / MariaDB

Complete MySQL and MariaDB support

mysql / mariadb
🐘

PostgreSQL

Advanced PostgreSQL features support

postgresql
🔶

Oracle Database

Enterprise Oracle database connectivity

oracle

Permission Types Checked

👁️

SELECT

Read data from tables using custom queries

INSERT

Insert test data into specified tables

🗑️

DELETE

Remove test data using multi-column conditions

CSV File Format

Required Columns

Basic Connection Info

  • db_name - Database name
  • username - Database username
  • password - Database password
  • server_ip - Server IP or hostname
  • port - Database port number
  • db_type - Database type (mssql, mysql, postgresql, oracle)
  • db_title - Description (optional)

Permission Testing (Optional)

  • select_sql - SELECT query to execute
  • crud_test_table - Table name for INSERT/DELETE testing
  • crud_test_columns - Column names (comma-separated)
  • crud_test_values - Test values (comma-separated)

Example CSV

db_name,username,password,server_ip,port,db_type,db_title,select_sql,crud_test_table,crud_test_columns,crud_test_values
SampleDB,sa,password123,localhost,1433,mssql,Sample DB,"SELECT TOP 3 * FROM users",users,"id, name, email","TEST_001, Test User, test@example.com"

Results Analysis

Result CSV Format

The application generates detailed CSV results with the following columns:

Basic Information

  • timestamp - Check execution time
  • pc_ip - Client PC IP address
  • server_ip - Database server IP
  • port - Database port
  • db_name - Database name
  • db_type - Database type
  • db_userid - Database user ID

Connection Results

  • result_code - SUCCESS / FAILED
  • error_code - Error code if failed
  • error_msg - Error message if failed
  • collapsed_time - Execution time in seconds

Permission Results

  • perm_select - SELECT permission (Y/N)
  • perm_insert - INSERT permission (Y/N)
  • perm_delete - DELETE permission (Y/N)
  • insert_success - INSERT execution result
  • delete_success - DELETE execution result

Query Details (v1.2.0)

  • insert_query - Actual INSERT query executed
  • delete_query - Actual DELETE query executed
  • operation_errors - Detailed error messages

Result Analysis

Success Indicators

  • result_code = SUCCESS
  • perm_select = Y
  • insert_success = SUCCESS
  • delete_success = SUCCESS

Failure Indicators

  • result_code = FAILED
  • Check error_code and error_msg
  • Review operation_errors for details
  • Verify connection parameters

Troubleshooting

Common Issues

Connection Timeout

Symptoms: Connection attempts fail with timeout errors

Solutions:
  • Verify server IP and port are correct
  • Check firewall settings
  • Ensure database service is running
  • Increase timeout values in CSV

Authentication Failed

Symptoms: Login failed or access denied errors

Solutions:
  • Verify username and password
  • Check user permissions in database
  • Ensure user exists and is active
  • Verify authentication method

Permission Denied

Symptoms: SELECT/INSERT/DELETE operations fail

Solutions:
  • Grant appropriate permissions to user
  • Check table existence and access rights
  • Verify column names and data types
  • Review operation_errors for details

CSV File Not Found

Symptoms: No CSV files found in directory

Solutions:
  • Place CSV files in request_resources/ directory
  • Use correct naming convention (DB_*, server_*)
  • Ensure files have .csv extension
  • Check file permissions

Best Practices

🔒

Security

  • Use dedicated test accounts with minimal privileges
  • Avoid storing sensitive passwords in plain text
  • Use encrypted connections when possible
  • Regularly rotate credentials
📊

Testing

  • Use unique test data identifiers
  • Test on non-production environments first
  • Verify cleanup operations complete successfully
  • Monitor database logs for issues
📁

File Management

  • Organize CSV files by environment or purpose
  • Use descriptive file names
  • Keep backup copies of working configurations
  • Document any custom modifications
🔄

Maintenance

  • Regularly update database drivers
  • Monitor application logs for errors
  • Test after database schema changes
  • Keep the application updated to latest version

Version History

v1.3.0
2025-10-08

Major Features

  • SQL execution results automatically saved to structured CSV files
  • #DATABASE or #DB preprocessor directive introduced
  • JSON parameter file support (alongside CSV)
  • Condition-based result grouping with metadata display
  • MariaDB database support added

Improvements

  • Automatic database selection from SQL files
  • CSV output clearly separated by parameter sets
  • Support for array and single object JSON formats
  • Execution results include DB metadata
v1.2.0
2025-01-07

Major Features

  • Enhanced log output with database-specific separators
  • Detailed error capture for SELECT/INSERT/DELETE operations
  • Streamlined file management with smart filtering
  • Multi-column DELETE conditions for precise testing
v1.1.0
2025-10-05

Major Changes

  • Safe permission checking using actual tables
  • Removed CREATE/DROP permission tests
  • Oracle connection error fixes
  • Enhanced CSV file format support
v1.0.0
2025-08-27

Initial Release

  • Multi-database support (MSSQL, MySQL, PostgreSQL, Oracle)
  • Database connection and permission checking
  • Server Telnet connection checking
  • SQL execution and result storage
  • Integrated menu system