Clipper On Line • Ver Tópico - Acessar dbf > 4gb (cdx) com delphi
Mudar para estilo Clássico
Discussão sobre Banco de Dados e RDDs para Clipper/[x]Harbour.
Postar uma resposta

Acessar dbf > 4gb (cdx) com delphi

03 Mai 2018 23:15

Boa noite a todos!
Preciso acessar uma base dbf onde alguns arquivos possuem tamanho superior a 4GB. A minha aplicação feita em delphi utilizava os componentes ADS, contudo, o TADSTable não consegue abrir um arquivo com tamanho superior a 4GB (Esses arquivos não podem ser acessados em modo exclusivo pois o software original ainda é utilizado pela empresa). Diante da "limitação" do ADS, passei a testar o ApolloDB, mas enfrentei limitações semelhantes no TAPolloTable. ALguém tem alguma sugestão de como acessar essa base mantendo os índices CDX atualizados?? Utilizo o Delphi Seatlle. Agradeço qualquer ajuda.

Acessar dbf > 4gb (cdx) com delphi

04 Mai 2018 00:44

Advantage does this by using a 64-bit unsigned integer to calculate the file offsets, while VFP uses a 32-bit signed integer. Using a larger value to track the file offsets allows Advantage to access DBF files that exceed 2GB in size. However, the native VFP driver will no longer recognize this file as a valid table.

When using Advantage the file size is limited by the operating system and available disk space. When using one of the latest file systems (i.e. NTFS, NSS) the file limit size limit is in Exabytes ( 1EB = 1 billion GB). A more realistic limitation is on the number of records that can be stored in the table. This is currently limited to 2 billion records therefore the maximum size of your table will be 2 billion times your record size.


https://archive.sap.com/documents/docs/DOC-39207

Acessar dbf > 4gb (cdx) com delphi

04 Mai 2018 11:18

Esqueci:

Acho que precisa considerar que os dois aplicativos deverão ser 64 bits.
Talvez por comando SQL não precise, já que a base não vai ser transferida totalmente.
De qualquer forma, vai ter que testar, ou pedir suporte.
Talvez até o software do servidor tenha que ser 64 bits (se já não é).

Acessar dbf > 4gb (cdx) com delphi

07 Mai 2018 14:18

Obrigado JoséQuintas pela colaboração!

O meu problema é justamente este abaixo:
Problem: An open table greater than 4GB in size was attempted with compatibility locking. Due to lock offsets required to implement record locking that can be shared across applications (either non-Advantage applications or applications that use Advantage Local Server), the table cannot be opened.

Solution: If you are using Advantage Database Server, open the table with proprietary locking. With Advantage Local Server, it is necessary to open the table in exclusive mode.

fonte:
http://devzone.advantagedatabase.com/dz/webhelp/advantage9.0/mergedProjects/adserror/err7xxx/7071file_is_too_large_to_be_opened_with_the_given_settings.htm


Como não posso fazer um acesso exclusivo, ainda não consegui resolver.

Acessar dbf > 4gb (cdx) com delphi

07 Mai 2018 14:26

Estou testando em um server com NTFS para validar.

Acessar dbf > 4gb (cdx) com delphi

07 Mai 2018 14:54

Não entendi. Se está usando SERVER, que diferença faz o acesso local????

Acessar dbf > 4gb (cdx) com delphi

08 Mai 2018 03:11

Amiguinhos,

As limitações de tamanho de arquivo podem estar relacionadas ao S.O. 32bits. Como o JoseQuintas frisou, transporte tudo para um S.O. 64 bits e trabalhe nele.

Com certeza os RDDs irão trabalhar com as limitações e deficiências do S.O.
Postar uma resposta