-user ""

64 views
Skip to first unread message

Benson Margulies

unread,
Jan 8, 2012, 4:36:20 PM1/8/12
to h2-da...@googlegroups.com
So, all the doc recommends using -user sa. However, a URL like jdbc:h2:/tmp/something, with no call to set a user name in the connection, ends up with a user name of "". Which all works, but i was a little puzzled before I could get things like the Script tool to work. Is a blank user name really a wonderful thing? Would it make more sense to map no name to "sa"? Or to allow a URL query param for the user name and password?

Thomas Mueller

unread,
Jan 11, 2012, 1:44:40 PM1/11/12
to h2-da...@googlegroups.com
Hi,

So, all the doc recommends using -user sa.

It's just an example really.
 
However, a URL like jdbc:h2:/tmp/something, with no call to set a user name in the connection, ends up with a user name of "". Which all works, but i was a little puzzled before I could get things like the Script tool to work.

I see the tools use the default user name "sa". Probably it was a mistake, and the user name should be an empty string if not specified (same as the password). I think I will change the default user name to an empty string in H2 version 1.4.

Is a blank user name really a wonderful thing?

(Now) I think it's more logical to use an empty user name if no user name is specified, than to use "sa" if no user name is specified.
 
Or to allow a URL query param for the user name and password?

That's already possible: jdbc:h2:h2;user=sa;password=sa

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages