Database Object for Oracle Error messages - database

I want to know the oracle objects which contain the predefined error messages along with the error code ,plz help me to get the database objects

If you want to find out the error messages you have had:
SELECT *
FROM user_errors

Do you mean the ORA-nnnnn type messages? If so, these I beleive are not held in database tables, but in OS files under Oracle_HOME as message files (for each language). There is (on UNIX/LInux at least) a utility called "oerr" which you run as "oerr ora 1301" and it will give you the message for the given code in the lanagues according to your LOCALE/settings. If you want to get all the messages, you can get these from the ORacle manuals, e.g.
http://docs.oracle.com/cd/B28359_01/server.111/b28278/toc.htm

Related

Spyder Kernel Dying

Let me first start by saying that this post is related to many on this site and that I am simply posting this for posterity and helping to add evidence as to why this particular error occurs.
So I have a script that I run that pulls in data to a data frame from sql, then it does some operations and writes the output back to the sql server. I first began experiencing the random "Kernel Died" error when I added the executemany() to my sqlalchemy script for writing to the server using pandas to_sql command. I could not figure this out for the life of me.
Continue down the road a bit and I began writing large amounts of information back to the server without using executemany() and was receiving the error that I had duplicate primary keys when writing to the server. I have known historically that there is a known issue in converting from pandas to h2o frames that the h2o frame will sometimes create a duplicate record in the frame. When this converts back to pandas you will still have the duplicate and when you write that back to the server you will still have the duplicate. One of the values being written back to my server is a primary key and so cannot have a duplicate entry and causes an error.
All of that being said. When I turn off executemany(), I get the error that there is a duplicate in the primary key and the operation stops. When I turn on the executemany(), I get the error that the "Kernel has Died".
So with that evidence I am proposing that the Kernel has Died error is some error in another package/entity that is not being translated back to the kernel and is causing a kernel has died error.
The question is: Where are we on these two issues? The posts I have seen are ~11 months old
Also if this post isn't allowed here where can I post information like this in order to help the developers understand the common problem?
EDIT: Follow on...
Just ran a test in jupyter with the same script. I received the appropriate error for duplicate primary key with executemany(). Just to be clear: in spyder I would have received "Kernel Died".
However i also received this error.
C:\Anaconda3\lib\site-packages\sqlalchemy\engine\base.py in
_execute_context(self, dialect, constructor, statement, parameters, *args)
1169 parameters,
-> 1170 context)
1171 elif not parameters and context.no_parameters:
C:\Anaconda3\lib\site-packages\sqlalchemy\engine\default.py in
do_executemany(self, cursor, statement, parameters, context)
503 def do_executemany(self, cursor, statement, parameters,
context=None):
--> 504 cursor.executemany(statement, parameters)
505
I just found a novice solution. Copy all your project files to a new directory, set the Spyder to factory defaults, and create a new project in the new directory! Dead kernel revives!
Something similar happened to me when using TensorFlow though. I fixed it by adding the following code at the start of my script
import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
It might have something to do with the kernel trying to import a module multiple times that it just crashes.

Obsfucation of code in commercial product

Yesterday, my manager asked me to find and remove all references to 'previous incarnation of company' that appear in the binaries we produce for a product that we're launching in a few weeks. This got me wondering why, in a compiled stand-alone binary, there's so much human-readable content, and whether there's a simple way to obsfucate it so that the program's internals aren't hanging out in the open, so to speak (at least to anyone who opens it with a text editor or greps the file contents). Here are some examples of what I mean:
"WGL_3DFX_multisample À # ð>Unknown OpenGL error
GL_INVALID_FRAMEBUFFER_OPERATION"
" Unable to close due to unfinalised statements not an error SQL logic error or missing database access permission denied callback requested query abort database is locked database table is locked out of memory attempt to write a readonly database interrupted disk I/O error database disk image is malformed database or disk is full unable to open database file table contains no data database schema has changed String or BLOB exceeded size limit constraint failed datatype mismatch"
"flowChartDelay flowChartDisplay flowChartDocument flowChartExtract flowChartInputOutput flowChartInternalStorage flowChartMagneticDisk"
The majority of the file is human incomprehensible stuff like this, which is more what I'd expect from a binary:
"âÀÿ? ‰•þÿÿÇ…”þÿÿ ë‹…”þÿÿƒÀ‰…”þÿÿ‹”þÿÿ;Mà}`‹U‹‚¨ ‹”þÿÿ¶ƒúuF‹E‹ˆ° ‹•”þÿÿ·Q¯…ŒþÿÿÁ艅Œþÿÿ‹M"
I figured out I could simply do a search and replace for 'string that we don't want' and replace it with random text of the same length and the program would run fine, which is possibly easier than making 500 edits to our source to bring it up to date with the current status of the company as a legal entity (there are a tonne of functions called name_of_previous_company_foo()), and also easier than trying to integrate some exotic obfuscation utility into our complex and propritary build system, but it's not an especially elegant solution, and I'd still like to know if there's a way to make our binaries into something more like a black box, where someone can't just open it with a text editor and see our function and class names.
People build source code obfuscator tools for "commercial software" that can scramble strings and identifiers so they aren't easily read out of the binary, but are still usuable as the strings they intend to be.
Such obfuscators tend to be language specific, because they have to handle the fine detail of the language structure.
Google "Source Code Obfuscators" and you'll find many.

Why does LinqPad say a database it presents me with is an invalid object name?

Trying to detective out what is in a certain file ("HHS_WCE4.ARMV4.CAB"), I searched my hard drive for any references to that. One of the results Fileseek* was in C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Template Data\tempdb.mdf
[consider this an asterisk] Why, oh why, doesn't Windows 7 come with a file search utility? their previous one, although kind of lame in some ways, was still one of the most useful applets/utilities for daily usage.
I tried to open that database to see what reference it could have to "HHS_WCE4.ARMV4.CAB" but it says it can't see itself in one pane after exposing the same thing on another pane:
Am I doing something wrong? Is there another way to examine the contents of tempdb?
Note: I tried to connect to this first via Add Connection > Build data context automatically > Default (LINQ to SQL) > Next > (localdb)\v11.0 > Attach Database File > Test, but get:
tempdb is not a table, it is a database.
however, you are trying to select from it - you can't treat a database as an object in this case. you have to select from a table.

AS400 Database access via jdbc

I am trying do a query on a table via jdbc in my java program.
I know there are three rows in that table.
I've got the resultset, and can read and process data of the first row. but when I try to move the resultset to next row, an exception is thorwn.
the exception pointed [SQL0181]
You can use the SQL Message Finder to look up message codes.
The SQL0181 message text is:
Value in date, time, or timestamp string not valid.
This indicates you have a value in a row that can not be represented as an SQL Datetime value.
It is not uncommon for legacy HLL programs to introduce these sorts of errors as they are capable of writing directly to the table row without the same validation enforced by the SQL interface.
See also this previously asked SO question: Why am I getting a “[SQL0802] Data conversion of data mapping error” exception?
I know this is an old question, but it's a top search result for SQL0181, and the answers is wrong.
The problem is the date being retrieved can't be represented in the date format being used. The IBM i allows several non-ISO date formats, which can't handle things like the beginning & ending of time. The error stems from trying to use one of them.
You can either have your user profile changed or use ISO on your JDBC settings.
"jdbc:as400://RCHASSLH;date format=iso;time format=iso;"
ref:
http://www-01.ibm.com/support/docview.wss?uid=nas8N1017268

ReleaseHandleFailed with SQLite + Entity Framework

I'm receiving an error message in VS2010 after I execute the following code to get values from a SQLite database via an automatically generated ADO.Net Entity Data Model.
using (Data.DbEntities ent = new Data.DbEntities())
{
var r = from tt in ent.Template_DB select tt;
r.First();//Required to cause error
}
The SQLite database table being accessed is called 'Template' (which was renamed to Template_DB for the model) with a few columns holding strings, longs and bits. All queries I've tried return exactly what's expected.
The message I receive is:
ReleaseHandleFailed was detected
A SafeHandle or CriticalHandle of type
'Microsoft.Win32.SafeHandles.SafeCapiHashHandle' failed to properly
release the handle with value 0x0D0DDCF0. This usually indicates that
the handle was released incorrectly via another means (such as
extracting the handle using DangerousGetHandle and closing it directly
or building another SafeHandle around it.)
This message comes up perhaps 60% of the time, up to 8 seconds after the code has completed. As far as I'm aware, the database is not encrypted and has no password. Until recently, I've been using similar MS-SQL databases with Entity Framework models and never seen an error like this.
Help!
EDIT:
I downloaded/installed "sqlite-netFx40-setup-bundle-x86-2010-1.0.81.0.exe" to install SQLite, from here. This included the System.Data.SQLite 1.0.81.0 (3.7.12.1) package (not 3.7.13 as stated in the comment below)

Resources