dbTalk Databases Forums  

Open a file > 2GB

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Open a file > 2GB in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sagar Choudhary
 
Posts: n/a

Default Open a file > 2GB - 06-16-2006 , 05:48 AM






Hi,
I am trying to open a file with size > 2GB.
My program looks like this,

DB *dbpS;
DBC *dbcpS;
DBT keyS, keyT;
db_create(&dbpS, NULL, 0);
dbpS->open(dbpS, NULL, source, NULL, DB_BTREE, DB_RDONLY, 0);
dbpS->cursor(dbpS, NULL, &dbcpS, 0);

memset(&keyS, 0, sizeof(keyS));
memset(&dataS, 0, sizeof(dataS));
while ( (ret = dbcpS->c_get(dbcpS, &keyS, &dataS, DB_NEXT)) == 0)
{
//Print the data retrieved
}

if (dbcpS != NULL)
dbcpS->c_close(dbcpS);
if (dbpS != NULL)
dbpS->close(dbpS, 0);

But I never get a entry.
The same program works for lesser file sizes.
What modifications do I have to make to read the database.

Thanks in advance.

Regards,
Sagar Choudhary


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: Open a file > 2GB - 06-16-2006 , 09:47 AM






Sagar,

What version of Berkeley DB are you using and what OS?

Can your OS handle file sizes larger than 2GB? Some OS's cannot
handles that size.

You have not configured for verbose errors. There are several messages
in this list that describe how to do that.

Did you get any error? Were there any errors when you inserted the
data.

Ron


Reply With Quote
  #3  
Old   
Sagar Choudhary
 
Posts: n/a

Default Re: Open a file > 2GB - 06-21-2006 , 02:07 AM




Ron wrote:
Quote:
Sagar,

What version of Berkeley DB are you using and what OS?

Can your OS handle file sizes larger than 2GB? Some OS's cannot
handles that size.

You have not configured for verbose errors. There are several messages
in this list that describe how to do that.

Did you get any error? Were there any errors when you inserted the
data.

Ron
I am using BDB 4.2.52 and the OS is RH9.
The OS can certainly handle file sizes larger than 2GB because I
created it on the same machine. The creation of the file was proper.



Reply With Quote
  #4  
Old   
Sagar Choudhary
 
Posts: n/a

Default Re: Open a file > 2GB - 06-21-2006 , 02:19 AM



Also the DB opens properly but get stucks while reading. The
application remains in a hang state.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.