The problem I have is that I m trying to create some form of security for data stored within our database. I am using the dbms obfuscation toolkit to encrypt certain elements of the data stored.
The problem I am faced with is not so much the process of encrypting and decrypting the data as that functionality works fine. I have also witten a procedure which allows me to change the public key.
The problem I face is how can I store the public key. Currently it is stored within the database this means that if the database goes missing then with the key and the knowledge that the data is encrypted using the obfuscation toolkit I have just wasted a days development.
The ideas I came up with are storing the public key in a temporary table within the database which needs to be recreated every time the database is restarted. This would work beautifully but the scope of a temporary table is limited to a session and not the life span of the database.
The other method I came up with was storing the key on the file system but all the code I have written to read or write from the file system has failed. The error message I get is invalid path.
Can someone suggest something as this functionality needs to go into production.
did you set UTL_FILE_DIR correctly? If your path has spaces in it you must put single quotes around it.
you could export the table often so you will always have a backup.
or you could use simple replication to replicate the table to a different schema in the same database.