Archive

Archive for February, 2010

Migration from MySQL to MSSQL – Quick Tip

February 18th, 2010 No comments

With the help of some colleagues, I could export all the indexes and primary keys, which we were using from a MySQL table as MSSQL compatiable TSQL using a union query and on the MySQL information_schema.

I did the migration to MSSQL using some tips found online, and calling a sp after connecting directly with the MySQL server. Actually forgot how it was done. Anyway it does not matter in this post. Will add it as a comment later on. The important matter was that, the method did not import any of the indexes, or primary keys. We manually created those were absolutely necessary to roll out the project. And now that we were about to release a service patch, and this includes more incredible search methods, the indexes are absolutely necessary.
Read more…

Categories: mysql, Tips Tags: ,

Quick and dirty htaccess rewrite for Lighttpd

February 16th, 2010 No comments

Writing this post and am getting ready to hide behind strong walls, since mostly lighttpd is meant to fly light, or serve faster without the bloat and dynamic flexibilities. But certain situations may occur where one may have to forget the religion and behave sensibly. For a major project which was collaborated by different teams of our spread out offices, one part was developed by a team who were more exposed to benefitting the furls (friendly urls), by using apache rewrites. The bang off was detected only at the last moment of roll out to the beta deployment at client environment.
Read more…

Cacti and rrdtool – a boon to the SysAdmins

February 14th, 2010 No comments

Regrett that I got familiarized with the cacti system only a week back. And once a clean installation was ready and running, the bottle necks started. Running snmpd for monitoring cpu, disk and network was an overkill. Though the snmp helped when we could add our WiFi Access Points, Routers and Switches. Even the traffic from our ISP Load balancer (pfsense) could be added for monitoring. All this was excellent. We got bottle necked at one point though.

Most of our colocated servers were behind heavy firewalls, and or running in virtual box machines inside real hardwares. True that we could use a single snmpd with multiple community id to collect data. But I was just reluctant. Just out of curiosity, the last one week day and night, at home, at work over IRC I was after getting the insides of both cacti and rrdtool. Thanks to the developers of both, and to all those who have contributed towards it. I did find better cacti templates on google code. This was one good step. The MySQL templates are simply superb. Also there is a script in php which does do ssh to remote servers and collect data. Good enough, but needed the cacti host root user to have a public key published on all of our servers.
Read more…

Posting to wordpress using php cli and xmlrpc

February 8th, 2010 9 comments

A reader once asked me if I could build a command line tool which takes title from one file, and content from another file to create wordpress post. I tried, which finally gave an outline to this script. I dont think that this is very high fly, but for those whom the xmlrpc is mumbo, this might be somthing worth looking into.
Read more…

Categories: Code Snippets, PHP, Tips Tags: , ,