How to solve ORA-25188: Cannot drop/disable/defer the primary key constraint for index-organized tables or sorted hash cluster

This time I was trying to reproduce an specific scenario and all of a sudden I was getting ORA-25188 in Tomcat’s console. A quick search on google revealed this method:  Connect as sysdba C:Userszulu>sqlplus / as sysdba Run the command, wait for the confirmation message SQL> PURGE DBA_RECYCLEBIN; DBA Recyclebin purged. That’s it, at least for me it worked but …

How to open computer management window from cmd in Windows 7?

A few days ago I needed to connect an external hard drive with a weird partition to my computer to format it as NTFS. I right clicked Computer and click Manage and nothing happened. I really don’t know why and I didn’t even care about solving it. The work around for this is to run the executable file directly from …

How to solve ORA-01017: Invalid username/password; logon denied

I was trying to connect to a database today when I found this: I think there could be a lot of reasons for this, but the easiest approach is to reset the user’s password, that is if the user exists of course. Here is the solution: Connect as sysdba to the database C:Usershecperez>sqlplus / as sysdba Run the following query …

How to check Oracle database version?

So today I needed to check what was my Oracle version because the PARTITION is not working and as far as I understand my version is not compatible with it. Here’s how to do it. Log in as sysdba C:Usersrecon1>sqlplus / as sysdba Run the following query SQL> select * from v$version; BANNER ——————————————————————————– Oracle Database 11g Express Edition Release …

How to solve ORA-28001: The password has expired

The other day I was happily opening SQL Developer when I found this horrible thing. Here is how to solve it. Connect as sysdba to the database. C:UsersSiry>sqlplus / as sysdba Run the query to set the password’s life time to unlimited. SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; Profile altered. Set a password for the locked user. SQL> ALTER …

How to execute several .SQL files from console

Yesterday I needed to run an older version of a project just to make a few changes, for that I needed to update my old code for that project and run all the scripts (.SQL files) to update the database. A colleague gave me a line of code to get the task done faster than executing each file manually, here it is: …

How to kill all processes with the same name in Windows 7?

Well, today at work I was using IBM Rational Synergy to sync my files and be able to compare them in order to determine which ones to keep / discard. The comparing tool I’m using is KDiff3, which in my opinion it’s ok, but when you select a bunch of files and compare them in bulk you get a lot of …

How to grant access to remote PC in MySQL?

The problem we were facing was that a colleague was trying to access to a MySQL database in my computer, we were both in the same network, he was being asked for password, so for that, here is how to grant root access to another IP to your local database. This worked for us. GRANT ALL ON *.* to root@’10.101.60.142′ …

How to execute .SQL files from console

Very easy, just log in into sqlplus and type as follows if you are in the same path as your file: SQL > @file_name.sql If you are not in the same path as your file, you should type as follows: SQL > @/path/to/file_name.sql What if I need to pass a parameter? Well, not a problem, just type as follows: SQL …

How to create Oracle users in Oracle 11g XE

Here is how it’s done. Log on as SYSTEM user C:Usersdelta1>sqlplus system SQL*Plus: Release 11.2.0.2.0 Production on Thu Feb 20 12:01:00 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 – Production SQL> Execute the CREATE USER command SQL> create user user_name identified by user_password; Provide permissions to the …