Sunday, April 14, 2013

Gardening In Chennai

Gardening in one of my great interest of all times. I have been so crazy about plants, trees from my childhood.

Being from Kanyakumari District (TamilNadu, India)  and with agriculture family background, the feel and interest comes so easily for me.

Now it is time for some flashback. :)

In good old school days, my dearest friends Vijay, Subramani  and myslelf grown lots of plants in our house. We roam around streets to source plants. At times, we put some master plan to pluck plants from nearby houses :)

Ok. Let me come to the point. So, I fell in love in gardening again last year, and started growing some in our Balcony in CHENNAI.

In this one year, I captured lot of good moments , so stay tuned for more updates from me :)

HERE IS the first set of images :
  1. Overall view:



2 . Small Cute Chilli_1 :


3.  Big Chilli :
4. Aloe Vera

5. Rose

6. Athimathuram :


7 . Hibiscus
8.  Got it from Yercaud .(Don't know the name)
9. Guava
10 . Golden dust Croton :




Pics from this post is also available @

https://plus.google.com/photos/105954072888293918065/albums/5866710526786447185

-Krishna.

Monday, January 28, 2013

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)

A new error I have seen while trying to connect to SQL server.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)

This error can occur any time, any where you click in studio. The place of occurrence will also be not consistent. Some of the places I have seen the error is,
  1. Trying to connect to SQL server.
  2. Right click on a DB.
  3. Executing a query. 
So, it was like some thing was messy.  Restarted SQL server, SQL browser services and even the Server. Nothing really helped. :(

SOLUTION: Simple as it always will be.
  1. Connect to SQL server via studio.
  2. Right click on SQL instance --> Properties --> Connections --> "Set the Maximum number of concurrent connections to '0' ". 
  3. Save the change. 
  4. Restart the SQL server if possible.
Cheers !!
Krishna.

Thursday, October 18, 2012

Finding Longest running query in SQL Server/MSSQL

In MySQL we use 'show full processlist' command to find if there is any query running for long time. This has helped me in some MySQL setups and I am able to find the problematic MySQL queries which is affecting the application performance.

However, in MSSQL this has been challenge as I am not able to find any straight forward solution in the SQL studio/Query.

Of late, for my MSSQL related queries I look up to one blog where I find almost all answers to my MSSQL problems. That is http://blog.sqlauthority.com/ .

This is been a excellent source of information for me and I hope all others who visited his blog might feel the same as well. Thanks Pinal Dave.

I have pasted his query which helped me to find the QUERY WHICH IS RUNNING for LONG time.

SELECT DISTINCT TOP 10
t.TEXT QueryName,
s.execution_count AS ExecutionCount,
s.max_elapsed_time AS MaxElapsedTime,
ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime,
s.creation_time AS LogCreatedOn,
ISNULL(s.execution_count / DATEDIFF(s, s.creation_time, GETDATE()), 0) AS FrequencyPerSec
FROM sys.dm_exec_query_stats s
CROSS APPLY sys.dm_exec_sql_text( s.sql_handle ) t
ORDER BY
s.max_elapsed_time DESC
GO

More info on the following links of his blog.

http://blog.sqlauthority.com/2009/01/02/sql-server-2008-2005-find-longest-running-query-tsql/
http://blog.sqlauthority.com/2009/01/23/sql-server-2008-2005-find-longest-running-query-tsql-part-2/

Cheers !!
Krishna.

Friday, October 12, 2012

wget command syntax to access URL via Proxy

Folks, this is been a long time since I have posted here. Hmm ...lot of work :)

Use case :

Last week I faced a situation where I am not able to access an External URL ( meaning the setup is behind the Proxy ) via proxy from the java code.

However we were able to access the same URL using browser. It was real tricky that as we were not able to pinpoint the exact error which is causing the problem while accessing via JAVA code.

Finding the Error :

Used 'wget' tool, to access the URL which gave the exact error.  Given below the syntax of the same using Proxy .

Syntax :

wget -e http_proxy=http://<proxyhost>:<proxyport> --proxy-user=<proxyusername> --proxy-password=<proxypassword> <URLName>

Please note the argument '-e'  which is required if you need to specify the 'http_proxy' argument and this 'http_proxy' will not be available in the help page of wget.



Cheers !!
Krishna.

Friday, June 8, 2012

Finding MSSQL is 32 bit version or 64 bit version

Folks,

As like my previous post, I have to find whether the MSSQL server installed in a machine is a 32bit version or 64 bit version. This is possible with a simple following query .

select SERVERPROPERTY(‘edition’)

The output will show the Edition name alone for 32 bit. For 64 bit, the Edition name have 64-bit string appended to it.

Sample output :

For 32 bit : Enterprise Edition

For 64 bit : Enterprise Edition(64-bit)

Thursday, March 22, 2012

Finding MySQL is 32bit version or 64 bit version

Finding whether MySQL is 32 bit version or 64 bit is possible with a simple query.

It is , show variables like 'version_compile_machine';

See the output from 32 bit version of MySQL.

mysql> show variables like 'version_compile_machine';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| version_compile_machine | ia32  |
+-------------------------+-------+
1 row in set (0.00 sec)


For 64bit, I believe the value will be 'x86_64'.

Thursday, March 15, 2012

SQL Joins - Understand with Venn Diagram

SQL joins simply explained with Venn diagram. Found it very useful, so thought of sharing with you guys.



Monday, February 20, 2012

Cricinfo scores widget

International Scores: Get the latest scores of all the international cricket matches from Cricinfo. Add the Cricinfo International Scores widget now!

Saturday, February 18, 2012

How to find MSSQL transaction log size

What is MSSQL transaction log :

Transaction log is basically used to write the transactions before committing them to database.  Never know the usage till now, even though used this term lot of times.

Why we need to know about the transaction log size.

Because this log file will grow and most of us are not aware of how much is being used and how much is left. So if the transaction log is full, the application using the database will not be able to write or read from it.

How to find the size. 

Simple. Connect to MSSQL studio and execute 'dbcc sqlperf(logspace)' .
Columns to look at is Log Size (MB)  and Log Space Used(%)

1.  Log Size (MB) - Current total log size for that table in MB.
2 . Log Space Used(%) - This will tell the used percentage with respect to the allocated/max size.

If some thing is greater than 90%, then probably you have to think of shrinking the log file or extending the MAX/allocated size.

Any other way to find this.

Connect to MSSQL studio, select the databases -->> right click --> Properties -->Files .

-Krishna.



Thursday, December 29, 2011

Removing mutlitple spaces in a file with single space in Linux

Folks, it is time for some Linux commands.

Ok. Here is the one that I have used, to remove lot of spaces between words with a single space in a file.

cat MoreSpaces.txt | tr -s ' ' ' ' > OneSpace.txt

For example the "MoreSpaces.txt file is having the following text.

"Hello          This is      having      more spaces        between words..."

So, once you execute the above command the output file "OneSpace.txt" will be created and it's contents will be like as given below.

"Hello This is having more spaces between words..."

Sweet isn't it ???





Saturday, December 24, 2011

Passing more than 10 arugumets to Windows Batch script

Last week came across an interesting scenario while working a batch script with my friend.
That is, we need to pass more than 10 arguments to a batch script. There will be no problem to pass 9 arguments. I will just try to explain the normal way we use to get up to 9 arguments and way to get more than 10 arguments.

Up to 9 arguments

Consider a script test.bat being called with arguments, a b c  as given below.

c:\> test.bat a b c
Inside test.bat we will getting the arguments as given below.
@echo off
           set arg_1=%1
set arg_2=%2
set arg_3=%3
For more than 10 arguments

We can not use %10 to get the 10th argument. Well, here is the solution we have found.

---------------------------------------------------------------------------------------
@echo ON

setlocal EnableDelayedExpansion

set arg_1=
set arg_2=
set arg_3=
set arg_4=
set arg_5=
set arg_6=
set arg_7=
set arg_8=
set arg_9=
set arg_10=
 //Tricky part
set /a m=0
FOR  %%i IN (%*) DO ( 
   set /a m+=1 
set arg_!m!=%%i
)

---------------------------------------------------------------------------------------

-Krishna








Friday, December 23, 2011

Apple wax peeler

I love eating apples, but I am very much worried about the wax on the apple skin. Even if we try to wash it, the wax will not go off very easily and the apple will be looking as shiny as ever after that.

I normally use knife to take it off, but I lose considerable amount of apple as well with the skin. At the end I will be eating only 70% apple alone. Considering the cost of the apple(Rs 25 /apple) this loss bothered me as well.

Accidentally seen a wax peeler tool when I was in a shop near my house. The cost is just Rs 25. 
Interestingly I found it very useful as it is taking skin of the apple alone and leaving much for me to eat. Hmm Yummy !!!!! ..

So if you go to shop next time, get one and enjoy. Will post some images if possible.

-Krishna.





Wednesday, December 7, 2011

show create table tablename - useful SQL query

Hello,

This is a very useful query in I used in MySQL to find out the "create statement" that was used to create a table.

It helped me to copy and paste the table.

Syntax and sample output,

mysql> show create table User\G;

*************************** 1. row ***************************
       Table: User
Create Table: CREATE TABLE User (
  ID INT(11) default NULL auto_increment,
  NAME char(60) default NOT NULL,
  EMAIL char(100) default NULL,
  PRIMARY KEY (ID)
) ENGINE=MyISAM


Unlike the query "desc tablename", which will give you the table definition,

we can get the table definition and the create statement from the

"show create table  tablename" query.


Guys, post your cases where you find this query useful.


-Krishna.

Friday, August 19, 2011

java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind

Came across the exception in subject when starting a java application via wrapper. The java app never started. Found the below article as a solution in lot of forums.



http://support.microsoft.com/kb/196271

This article suggests to set the MaxUserPort in Windows  registry to 65534. This setting may solve the problem, however I have couple of questions here.
  1. The exception is occurring because of no TCP ports available at that point of time, so if you do a Server reboot, all the TCP port will be cleared up and java app can be started. 
  2. Is there any way to check (Windows Event log/ application log ) in Windows level when the java app trying to open the TCP socket it is failing. So that I can justify that the cause.
-Krishna.








Sunday, January 30, 2011

Bat bite -Interesting info

Hello,

Yesterday happen to see the bats biting humans in Discovery channel.

The interesting info is that, the saliva of the bats have anticoagulant( a substance which stops blood clotting) and analgesic. So when they bite mostly it will not be felt by the person.

I guess, similar is the case with Leech bite as well.

Did you guys know any other bird, insects like this.

-Beginner



Saturday, January 29, 2011

Electricity Bill & BSNL land line bill online payment links

Hello,

I have been using the below links for a while to pay my BSNL and EB bills. If you are not using, use the below links to create your account to pay the bills.

If you are tenant, the good news for you is you can ADD the new EB connection to your existing online account when shifted a new house.

  1. http://billchn.bsnl.co.in/index.html
  2. https://www.tnebnet.org/awp/TNEB/index.php
 -Beginner








Friday, January 28, 2011

SMS Modem connection - Test using Hyperterminal

Hello,

I have been looking at the possible ways to check the connection of a SMS modem in my machine. Googled a bit and able to find out some useful links which actually helped me. Thought of sharing this with you guys.

  1. http://help.expedient.com/dialup/hyperterminal.shtml
  2. http://www.developershome.com/sms/howToUseHyperTerminal.asp
  3. http://www.multitech.com/en_us/documents/collateral/manuals/s000444c.pdf (Specifically for Multitech Modem)  
- Beginner

Wednesday, January 26, 2011

Beginning

This is a beginning of my long lasted wish.

I always wondered, day by day we are learning lot of things either professionally or personally. So how about having those learning  recorded some where. Yes, I am going to use this blog to have those things recorded.

Please bear with my writing, if you happen to read my blog. Will try my best to have some thing in this space everyday.