Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to connect to default path "host:default" [CORE4062] #4390

Open
firebird-automations opened this issue Mar 14, 2013 · 8 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: PizzaProgram Ltd. (szakilaci)

The idea is to check and set some things BEFORE trying to connect to a real database.
- testing if the service is running
- asking for client/server version
- load monitoring
- getting some default events, like: server_shutdown
- maybe testing/setting user accounts (have to think about security issues)

WHY?
- application developers could easily exclude/specify errors before connecting to corrupted database or check necessary version
- it would help a lot to change from prev. versions to new one.
- monitoring overall performance, connections
- getting notification of server shutdowns
... and more

@firebird-automations
Copy link
Collaborator Author

Modified by: PizzaProgram Ltd. (szakilaci)

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Why not use Service API ?

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

On remote db? What do you mean?

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

... for example this would make life much easier for application developers: (especially for beginners)

try
path := 'myserver:default';
// connect to database...
// > if fails >> Showmessage('The server is not awailable') > exit;

// test version number,
// > if fails >> Showmessage('Your Firebird version is not good on "myserver", please install the ...32bit version ') > exit;

// test user (maybe SYSDBA should not be allowed for security reasons)
// > if fails >> remember to make new users after connecting to real database
except
// any other not handled errors ...
exit;
end;

// ... and NOW you can try to connect to the REAL database, and you'll know, if something wrong with that > the service, connection, engine version, etc must be fine !
// >> so you can shrink the error possibilities to :
- "non-existing",
- corrupted\damaged,
- wrong ODS version of db,
- user-access-denied error types.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Please follow Vlad's advice and learn the documentation about Services API. It allows you to connect to the server rather than to the particular database. And you can ask for its version, etc.

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

<OFF>
Dear Dmitry and Vlad, ;)
Sorry for the late answer, it took me a month to collect enough info about the subject.

1. I've phoned several programmers using Firebird actively, but NOBODY knew about how to use Firebird Services APIs directly.
> so I have proof now than 9 of 10 programmers do not now how ... (incuding me and I'm not a beginner)

2. Asked on hungarian Firebird forum > took 1 week somebody gave me any answer:
"TIBServerProperties can be used to that purpose".
3. Later, as I've tested that, and had to realize > it's not working well, for example :
.isServiceRunning gives always False :( ... so precompiled components are useless !

4. Spent 3 days to learn more about Interbase ApiGuide.pdf (442 pages)
>> conclusion : tooo difficult and inpraktical to use (and I'm using/learning FB since 9 years!)
There are a very few advanced "gurus" could write complete database-components like UIB.

5. Told everyone about my idea, and ALL of them found it great and easy to use ;)
(even a "PHP-starter" could use it in 3 lines)

So please consider my recommendation, how to make every programmers life easier and turn FB to an easy-to-start-and-test tool.
I'm REALLY just wanna help to mention a problem, everyone agrees with.

Thank you for your time and attention.

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

... of course we can change the keyword "default" to something else too, like: "test_database".

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Alpha 1 [ 10331 ] =>

Version: 2.5.3 [ 10461 ] =>

Version: 2.1.6 [ 10460 ] =>

Version: 3.0 Beta 1 [ 10332 ] =>

Version: 3.0.0 [ 10048 ] =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant