Hi Régis,
More responses inline...
On 7/12/16 12:23 AM, rsmon wrote:
Hi Ricks,
Thank you for your response.
Effectively when i execute select * from sys.sysschemas where schemaName =
'TESTEUR';
i obtain: 278b81cd-0155-d9ce-d86a-000012e9eb35 TESTEUR APP
As you note, this indicates that the database is owned by APP. So you
need to connect as user APP in order to fix your permissions issues.
The authorized user for the schema is not Testeur.
Yet, via netbeans services wizard, i have created the database
BaseTestDroits with user name Testeur and a password and the result is a
database with shema Testeur ( an also App) but the schema Testeur have app
for authorized user. How can i connect as owner of database App?
I have succeded like this
1) create a database with the netbeans wizard BddTest1 without user but a
passwd ( admin )
2) connect this data base with Netbeans
services->databases->drivers-javadb(Network)->connect using
set only the passwd admin
3)
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.uSCH', 'y');
create schema SCH authorization uSCH;
This indicates that you are using the BUILTIN authorization scheme,
which is administered via properties. We don't recommend BUILTIN
authentication any more because it can be subverted easily (as you are
about to see). Instead, we recommend using NATIVE authentication.
I don't know what password Netbeans established for the APP account.
Maybe Netbeans documents this password somewhere. If not, you may be
able to override the password with a system property, that is, one which
you set on the boot command line like this...
java -Dderby.user.APP=foo ...
Hope this helps,
-Rick
CALL
SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.sqlAuthorization','true');
4) RESTART SGBD SERVER and Connexion uSCH/y"
5) create table SCH.Client( numcli int primary key, nomcli varchar(30));
insert into SCH.Client values(1,'Dupont Jean');
insert into SCH.Client values(2,'Leroux Martin');
grant select on SCH.Client to pierre;
6) Connect to database without user but password admin
7) CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.pierre', 'z');
8) Connect with pierre/z
9) select * from SCH.CLIENT
NUMCLI NOMCLI
1 Dupont Jean
2 Leroux Martin
Regards
--
View this message in context:
http://apache-database.10148.n7.nabble.com/lose-ownership-on-date-base-after-set-derby-database-sqlAuthorization-to-true-tp146429p146433.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.