Subject | Re: How to wipe a database |
---|---|
Author | mark.ruys |
Post date | 2011-04-01T15:34:35Z |
--- In firebird-support@yahoogroups.com, Norman Dunbar <Norman@...> wrote:
$ sudo isql-fb mydb
Database: mydb
SQL> select * from user where userid = 'test';
USERID PASSWRD CUSTKEY LEVL
============ ================ ============ =======
test account 19 3
$ sudo -u firebird isql-fb mydb
Database: mydb
SQL> select * from user where userid = 'test';
Statement failed, SQLCODE = -551
no permission for read/select access to TABLE USER
So apparantly root connects as SYSDBA???
Mark
> > Well I'm absolutely sure that I did not add username/password to the command line, nor defined ISC_USER/ISC_PASSWORD environment variables. All I typed was:root
> >
> > gbak -Z mydb-prod mydb.fdb
>
> This is what you said in your original posting. When I tested that what
> the new docs said was correct, I tried this exact command (ok, different
> database alias and backup file!) as root, as firebird and so on. Each
> time I ran the gbak, I was prompted to enter my username and password.
>
> I'm a tad confused! What login are you running the commands under?
> > mydb-prod is an alias to /opt/firebird/mydb.fdb, and my current directory is /opt/firebird. This command started to generate a backup on top of the database, erased the database, and failed the backup in absence of a database.nothing shows up (still being root)
> >
> > Note that when I run
> >
> > gbak mydb-prod /opt/dump/mydb.fbk
> >
> > I also get a backup (the proper way). So I guess my configuration does not need a user/password?
>
> You don't and any rogue environment variable lying around do you? "env |
> grep -i i[s]c" should show them up if so.
> Otherwise I can't figure out why you don't get asked for a password.Could it be because I run gbak on the same machine where Firebird is running (localhost)?
$ sudo isql-fb mydb
Database: mydb
SQL> select * from user where userid = 'test';
USERID PASSWRD CUSTKEY LEVL
============ ================ ============ =======
test account 19 3
$ sudo -u firebird isql-fb mydb
Database: mydb
SQL> select * from user where userid = 'test';
Statement failed, SQLCODE = -551
no permission for read/select access to TABLE USER
So apparantly root connects as SYSDBA???
> Oh, this assumes Linux of course, which is what I did my testing on.CentOS 5
Mark