Category Archives: Scripts

Batch Script – Reading parameter file into variables

Hi folks, quick tip on how to easily read a parameter file from a batch script. This is an idea I had to make the life easier when trying to troubleshoot connection issues from client to server and I had … Continue reading

Posted in Scripts | Tagged , , , , , , , , , , , | Leave a comment

Move tables and indexes from certain schema to a different filegroup

Moving tables from a schema to a new filegroup might be tricky and it is even worse when the schema is not dbo. To easily address that I have setup a script that move the objects to schema dbo (using … Continue reading

Posted in Scripts, SQL Server | Tagged , , , , , , , , | 2 Comments

Using the command TRAP to protect Root account

If you are as crazy about information security as me, you’ll find this very cool. We can create a trap to protect root account using the command TRAP! How cool is that?! First of all, you need to open the … Continue reading

Posted in Scripts | Tagged , , , , , , , , , | Leave a comment

Shrink and truncate the log file

If the transaction log of a certain database is using too much disk space on the server, you might want to revisit your transaction log backups and set them to run with a higher frequency. You can always reclaim some … Continue reading

Posted in Scripts | Tagged , , , , , , , , , , , | Leave a comment

Script – Check and take tablespaces from backup mode

I have created these on Windows environment, using in unix/linux is possible, but some changes in the spool path and script call are needed.

Posted in Scripts | Tagged , , , , , | Leave a comment