gbak issues "Your user name and password are not defined" instead of "database 
shutdown" when command switch "-fe(tch_password) ..." is specified with correct 
password in file
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: CORE-6000
                 URL: http://tracker.firebirdsql.org/browse/CORE-6000
             Project: Firebird Core
          Issue Type: Bug
          Components: GBAK
    Affects Versions: 2.5.8
            Reporter: Pavel Zotov


Create following batch for test (replace value of 'fbc' with folder where 
FB-binaries are; replace value 'dbnm' with apropriate for your env.):
=====
    @echo off
    setlocal enabledelayedexpansion enableextensions
    ::set fbc=C:\FB\40SS
    ::set fbc=C:\FB\30SS
    set fbc=C:\FB\25sC\bin

    set ISC_USER=
    set ISC_PASSWORD=
    set sql=%~dpn0.sql
    set pwf=%~dpn0.tmp
    set psw=masterkey
    echo !psw! >!pwf!

    set dbnm=C:\FBTESTING\qa\misc\tmptest.fdb
    for /f %%a in ("!dbnm!") do (
       set dbbk=%%~dpna.fbk
    )
    del !dbnm! 2>nul
    del !dbbk! 2>nul

    echo create database 'localhost:!dbnm!' user 'SYSDBA' password '!psw!'; > 
!sql!

    !fbc!\isql -q -i !sql!
    !fbc!\gfix -shut full -force 0 localhost:!dbnm! -user sysdba -pas !psw!

    @echo on

    !fbc!\gbak -b localhost:!dbnm! !dbbk! -user sysdba -pas !psw!

    !fbc!\gbak -b -se service_mgr !dbnm! !dbbk! -user sysdba -pas !psw!

    !fbc!\gbak -b localhost:!dbnm! !dbbk! -user sysdba -fe !pwf!

    !fbc!\fbsvcmgr service_mgr user sysdba fetch_password !pwf! action_backup 
dbname !dbnm! bkp_file !dbbk!

    !fbc!\gbak -b -se service_mgr !dbnm! !dbbk! -user sysdba -fe !pwf!


    @echo off
    del !dbbk! 2>nul
    del !dbnm!
    del !sql!
    del !pwf!
=====

If we run this batch then its output will be:
=====
    C:\FBTESTING\qa\misc>!fbc!\gbak -b localhost:!dbnm! !dbbk! -user sysdba 
-pas !psw!
    gbak: ERROR:database C:\FBTESTING\QA\MISC\TMPTEST.FDB shutdown 
------------------------------ OK, expected
    gbak:Exiting before completion due to errors

    C:\FBTESTING\qa\misc>!fbc!\gbak -b -se service_mgr !dbnm! !dbbk! -user 
sysdba -pas !psw!
    gbak: ERROR:database C:\FBTESTING\QA\MISC\TMPTEST.FDB shutdown 
------------------------------ OK, expected
    gbak: ERROR:    Exiting before completion due to errors
    gbak:Exiting before completion due to errors

    C:\FBTESTING\qa\misc>!fbc!\gbak -b localhost:!dbnm! !dbbk! -user sysdba -fe 
!pwf!
    gbak: ERROR:database C:\FBTESTING\QA\MISC\TMPTEST.FDB shutdown 
------------------------------ OK, expected
    gbak:Exiting before completion due to errors

    C:\FBTESTING\qa\misc>!fbc!\fbsvcmgr service_mgr user sysdba fetch_password 
!pwf! action_backup dbname !dbnm! bkp_file !dbbk!
    database C:\FBTESTING\QA\MISC\TMPTEST.FDB shutdown 
------------------------------ OK, expected
    -Exiting before completion due to errors

    C:\FBTESTING\qa\misc>!fbc!\gbak -b -se service_mgr !dbnm! !dbbk! -user 
sysdba -fe !pwf!
    gbak: ERROR:Your user name and password are not defined. Ask your database 
administrator to set up a Firebird login. ---------- [ ??? ]
    gbak:Exiting before completion due to errors
=====

PS.

Only FB 2.5.x is affected. No such problem on 3.x and 4.x



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to