HSQLDB:user lacks previlige or object not found - hsqldb

I created a table in HSQLDB, but when I insert any value into the table I am getting the following error:
user lacks previlige or object not found.
My column names are username and password. This is HSQL Database Engine In-Memory. The driver is org.hsqldb.jdbcDriver and the url is jdbc:hsqldb:mem. What did I do wrong, can anyone help me out?

You are almost certainly creating the table in one Java process and inserting the values in another Java process.
The short answer is: use an HSQLDB server for the database and connect to the server from your different processes.
See the Guide on how to run a server.
http://hsqldb.org/doc/2.0/guide/listeners-chapt.html#lsc_hsql_server
There are also HowTo pages at http://hsqldb.org

Related

Invalid Object Name in mssql 2005

We currently have an issue with our MSSQL 2005 database. We've recently undergone a migration from windows server 2003 to 2008. SQL Server has remained as 2005. I'm using SQL Server Management Studio to work on.
All the tables in the database follow the format: [SCHEMA].[TABLE_NAME]
When I enter the SQL:
SELECT * FROM [table_name]
I get the error message: Invalid object name '[table_name]'.
If I type in:
SELECT * FROM [schema].[table_name]
This works fine. The username we log into the database with owns the schema which is prepended to all the table names.
The problem is, we have 3rd party companies which have software which exports data from the database. 2 companies have now tried to run their exporters, however are getting the error 'Invalid object name'. The software is logging in with the username which owns the schema.
My question is exactly the same as this one I've found on the internet:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=99802
However the answer on that question seems to be full of keywords rather than actual sentences which makes it very hard to understand.
If anyone could help, it'd be greatly appreciated.
Many thanks
Phil
Set the default schema for the 3rd party's username to the schema their un-prefixed references should point to:
ALTER USER foo WITH DEFAULT_SCHEMA = [bar];
(This is different from owning the schema.)
And tell them to write software correctly. In SQL Server you should always be specifying the schema name, even if you always use dbo.

How do I access an MS Access database from Oracle?

Configured access from Oracle to MS Access.
Oracle XE 11.2.0.2.
Microsoft Access 2010
There are two INSERTS (insert into table that is residing in MS ACCESS db) operations. One of them is using pl\sql variables, another one is not.
First insert:
insert into SomeTable#MSADB("ID", "Name")
values(l_ID, l_Name);
Second one:
insert into SomeTable#MSADB("ID", "Name")
values(123, 'SomeName');
In a case of second insert, all is fine. But first one gives an error "HYC00 NativeError=106 optional feature not implemented". I just can't understand why this is happening and how to solve this problem.
Bind variables(execute immediate) didn't solve this problem. DBMS_HS_PASSTHROUGH.BIND_VARIABLE didn't solve this problem either.
Only solution I see is embedding those variables into a string and then execute it.
Are there another solutions to force the first insert to work?
Thank you.
There was a known issue in the Oracle 11g client with the ODBC driver connecting to excel workbooks and it was giving the same error. Oracle released Patch 7009291 to address that issue so you might take a look at that patch to see if it will address the access issue as well.
You can also enable DG4ODBC tracing to see what is going on and identify if this is a similar issue to the excel one. Tracing is enabled by setting in your init.ora file HS_FDS_TRACE_LEBVEL=255 The trace file is then found in your \hs\trace

copying data between servers on two different machines - SQL

I found this question Copy table to a different database on a different SQL Server which is close to what I want but my two databases are on two different machines. I am interested in backing 1 or two tables, not the whole database. I tried BCP backup and bulk insert but I am consistently getting error on importing date field (type mismatch or invalid character for the specified codepage). I gave up after I successfully imported the peice of csv file that I was getting error for in a new test table.
Now I would like something like this
select INTO mycomputer\SQLEXPRESS\target_table from ReMOTECOMPUTER\SQLEXPRESS\source_table
or anything similar? Can I do that, what is the proper syntax if yes. I tried but was not successful.
Have you looked at using linked servers? We had a somewhat similar data consistency issue and used a linked server setup to provide for triggered data propagation. Once you have the linked servers defined you can issue your statement pretty much as you have it listed in your question.
http://msdn.microsoft.com/en-us/library/ms188279.aspx

How do I use SQL to Drop a Column from a MS ACCESS Database if that column is a replication ID?

I had a notion to use a database column of type replication ID, but have since changed my approach and want to use this column for another purpose.
However, I'm unable to use SQL to drop the column to remove it from my database.
My SQL is:
ALTER TABLE foo_bar DROP COLUMN theFoo;
However, I get a "syntax error" and I'm assuming this has something to do with this column being a replication ID.
I'd rather not download the file and edit it directly using the MS Access application, but not sure if that's my only recourse.
Thanks so much in advance.
Regards,
Kris
If you have access to the database in a command shell, Michael Kaplan's Replication System Removal Fields utility should do the trick. However, I've found that in some circumstances, it's unable to do the job. Also note that the utility will only work with a Jet 4 format database (MDB), not ACE format (ACCDB).
If all else fails, you can recreate the table structure and append the existing data to it. That can get messy if you have referential integrity defined, though, but it will get the job done, and likely most of it is scriptable (if not all possible using just DDL).
Here is a link that may help you, I had a similar idea but when browsing the web found this
AccessMonster - Replication-ID-Field-size
EDIT: Well I don't have much time but what I was thinking of first was if you could alter the column to make it different (not a replication ID) and then drop it. (two separate actions). But I have not tested this.

HSQLDB how to manually insert records

My question is how can I manually add records to hsqldb database. I mean using command line or some client. I know I can use hsqldb manager but I cannot execute any query with it. It says that there is no table of specified name. What might be the problem?
Ok the problem was I wasnt connecting to actual database file :)
HSQLDB Manager works :p
Cheers