firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Ограничение на полное имя файла базы данных в MON$ATTACHMENTS

Open pincher1519 opened this issue 2 years ago • 5 comments

The application checks the number of connections to the database of different other users, from other computers, and so on. There are many databases (it can reach not only hundreds, but also thousands of files) and it is not convenient to use aliases. The databases are arranged in directories and sometimes their path exceeds the limit specified in MON$ATTACHMENTS.MON$ATTACHMENT_NAME

When trying to get the number of connections to the database, as well as information about who is connected to the database, an error is thrown. This table cannot be opened using IBExpert Безымянный

Used Firebird_3-0-8-33560, but more recent ones have the same problem. It is not possible to change the system table.

When connecting to databases, UNC paths are used "\\?\"

Are there any plans to allow getting connection data from the system table for databases whose path exceeds 255 characters?


Sorry: Translated from Russian using google translate

pincher1519 avatar Jul 25 '22 14:07 pincher1519

UNC should never be used. It is not safe to share the database folder. If you meant WNET, then it's better not to use it either. It is considered obsolete and will be removed in Firebird 5.0. Tickets should be made in English so that all developers can read them, and not just Russian-speaking ones.

sim1984 avatar Jul 25 '22 15:07 sim1984

It is not network UNC. It is a hack to make old API work with long paths.

aafemt avatar Jul 25 '22 15:07 aafemt

UNC should never be used. It is not safe to share the database folder.

Yes, the system is designed in such a way that you have to work mainly with databases on Windows OS, for network versions of databases there is a separate service database described in aliases, which describes all local paths to databases that can be accessed. There is no other way to figure out how to have access to thousands of bases from the outside to get their list. If you have an example of how a third-party utility can ask the server what databases it can connect and provide from a specific directory - I would love to hear it. But for now, everything is organized in such a way that clients connect bases using an absolute path on the server, recognizing their paths through a fixed base through an alias.

If you meant WNET, then it's better not to use it either. It is considered obsolete and will be removed in Firebird 5.0.

No, I don’t know about such functionality, I don’t use it

Tickets should be made in English so that all developers can read them, and not just Russian-speaking ones.

Unfortunately, my English is very poor, so if you need to write, then it's through a translator

pincher1519 avatar Jul 25 '22 19:07 pincher1519

It is not network UNC. It is a hack to make old API work with long paths.

One way or another, you need to connect databases along paths located up to 500+ characters with Russian-language directory names, which reduces the path size by half due to UTF 8. In total, with 255 bytes of data, ~128 characters remain for the full path to the file. This is not enough in modern realities. The same Linux systems allow you to work with much larger paths (if I'm not mistaken, up to 32k characters), and in Windows you can access files using large paths by adding the UNC prefix "\\?\d:\Folder\folder\...". There are other approaches how to connect to databases using long paths?

pincher1519 avatar Jul 25 '22 19:07 pincher1519

In any case Firebird is using ANSI API for files. There is no way to use UTF-8 or expand length of path beyond 253 characters.

For thousands of databases I would suggest to use hexadecimal names derived from GUID. One short path can contain them all.

aafemt avatar Jul 25 '22 19:07 aafemt