Export SQL script functionality

Signed-off-by: aurel <aurel.savoiu@cti.pub.ro>