Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I am using eclipse on mandriva and SQL Anywhere 12. when I create the tables via JPA (part of JEE5), the Java Persistence API, the tables are created, what is good, but with the format : <user_name>.<table_name>, e.g. "olivier_dba.t_item", but I would like to have "t_item". I saw the logs, and the SQL orders don't mention the user_name : the error seems to come from SQL Anywhere. and it is not a whim from me, but I can't go ahead in my project since there are errors in the java files (because the entities are not found in the DB).

can you help me?


EDIT - some news : finally I think that the user is not added to the table, but the eclipse plugin (SQL explorer) add the name of the user at the beginning of the name of the table. in sybase central I found that the names of the tables are good.

the error in eclipse is : "schema 'dbo' cannot be resolved for table <the_table>.

any suggestion?

asked 17 Apr '11, 16:36

lolveley's gravatar image

accept rate: 0%

edited 29 Sep '11, 06:52

Volker%20Barth's gravatar image

Volker Barth

If you do not specify a table owner when creating a table (e.g., "CREATE TABLE t_item( ..."), the default behavior is to assign the table to the creating user.

If you want the table to be owned by another user (i.e., in another namespace), you simply need to explicitly include the desired "creator" in the CREATE TABLE command -- for example "CREATE TABLE dbo.t_item( ..." will create a table named t_item within the dbo schema.

Just as an aside, this is a very clear difference between That Other Transact-SQL server and Sybase's product. Microsoft SQL databases default to creating tables in the dbo schema when no table owner is specified, while SQL Anywhere uses the (more rational, IMNSHO) convention of assigning ownership to the user who actually created it.

permanent link

answered 17 Sep '11, 21:41

William%20Clardy's gravatar image

William Clardy
accept rate: 0%


It should be added that DBA authority is required to create database objects for different owners.

Users with RESOURCE authority (but not DBA authority) can only create database objects in their own schema.

(29 Sep '11, 06:14) Volker Barth

Ah, good catch.


(29 Sep '11, 13:00) William Clardy
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Apr '11, 16:36

question was seen: 2,914 times

last updated: 29 Sep '11, 13:00