Posts

Showing posts from August, 2012

Delete the data from All tables in Oracle

Image
In this case I need to delete all the Data in my tables because I'm making test of upload all the Data, and I'm too lazy to delete all the tables and create them again, so I'll show you a way to delete all the data :) . First you need to disable all the constraints, or at least foreign keys, if you don't do it, you can get an error unless you delete the tables in the right order. watch this post to disable them. Disable and Enable All table constraints in Oracle Now that you have disabled all the constraints, run the next pl/sql block that will delete all the data in all the tables. and as you don't have constraints, you will not get errors :D . begin for r in (select table_name from user_tables) LOOP execute immediate('delete '||r.table_name); END LOOP; end; After do it, active again the constraints and it is done, you have deleted all the data from the tables, now you can celebrate that you have a clean data Base ready to test or first use :D . Now y

Disable and Enable All table constraints in Oracle

Image
Sometimes you have to do something that requires disable all constraints, like upload Data, and enable them again after do it. I've found two useful pl/sql code that will do it, but it will only work if all your constraints are enabled, if there is one that is not enabled, at the end of the process it will be enabled. if you have not that problem, check the useful pl/sql here Disable all table constraints in Oracle If you don't know if there are disabled constraints, you can find the answer running the next query, if it doesn't return data, all your constraints are enabled and you can use the pl/sql in the adobe link SELECT constraint_name FROM user_constraints WHERE status = 'DISABLED' If you have disabled constraints that you don't need, you can delete them and use the adove link, but sometimes we have disabled constraints because the aplication is not 100% complete or something, anyway, those are constraints that you'll need in the future and

Show in Messenger what you are listening on Winamp.

Image
Although the message in the image might be true, there is still people who uses Live Messenger :P , yeah, I'm one fo them hehehe... All what you will need to show what you are listening is a plugin for Winamp, you can get it here: Live Messenger Now Playing Plugin - Customizable and compatible with MSN Messenger or MS Live Messenger If by a reason the plugin is deleted, as the one I used to download, you can search other or get it in my Skydrive Here , I hope the Plugin developer do not hate me for upload it there hehehe Once you download it, Close Winamp and run the File, It will 'install' the Plugin in your computer, what it really does is copy the plugin in Winamp's Plugin Folder, that's why you have to specify the directory where it is installed, by default it select the default directory of Winamp. After 'install' it Open Messenger, Select "Show What I'm Listening" as Status message and finally open winamp, play a song and watch