Posts

Showing posts from 2012

How to solve “svn: Checksum mismatch while updating..” ?

SVN (version system) is good tool for version control. Howeveer, if we commit some mistake while updating or cancel a file being up dated then the files in which it keeps the information get corrupted and all subsequent update tries will give the error o f Checksum.   To resolve th is follow following steps: 1. Open the entries file located in .svn directory where you are getting the error. 2. Find the entry for the file giving error and replace the expected value with actual value in error. 3. Now synchronize and try to update.  If it st ill does not work. Try these. Its just a workaround though: 1. Delete the file from your system. 2. Delete the entry of the file from entries file. (Starting from the name of the file till the special characters ) . 3. Now Synchronize and update the file. T his will get latest version of file from repository and all conflicts will be resolved. Cheers..      

FTP Command to upload file

A small but useful piece of information for uploading a file to FTP from batch file Put the command in batch file: ftp -i -s:ftpComm,txt -n <ftp servername> Create a file with ftp commands(ftpComm,txt): USER username password bi cd buildDir mput c:\new.sql bye

Optimized Database access

Optimized Database Interaction: While writing applications for interacting with database using JDBC or using ORM tools like hibernate, we face the problem of optimizing the memory and resource usage. Some tips that would be handy in this: 1. Always close the statements and other resources object after use. 2. Select the specific required fields instead of getting all fields.    eg.      Use           Select OrderId,ItemId from  orderDetails      instead of          select * from orderDetails 3. Use Connection pools 4. Prefer stored procedures instead of direct SQL 5. Turn autocommit off if  not using stored procedures but dont let transactions wait for too long. 6. Tune the SQL to return the minimised data return. 7. User joins instead of sub-queries if possible. 8. Cache data to avoid multiple DB calls for the same data.