Hi Jeeva,
CRM online only allows sandbox plugins - which may not allow you to open SQL Server connection from plugin.
What you may have to do is use some kind of scheduled task that scans CRM online for new records created and update SQL Server - like pull operation from your side.
You can also try to see if SSIS Integration tool from Kingswaysoft is of any help to you. There are other tools like scribe etc.
You can also try to create a web service that writes into your SQL server and invoke this webservice from your plugin as per the following article?
https://msdn.microsoft.com/en-us/library/gg509030.aspx
Regards,
Jithesh