1. Beatrix Willius
  2. Valentina Database ADK
  3. Wednesday, May 26 2021, 05:02 AM
  4.  Subscribe via email
Having a senior moment: how do I increase the segment size of an archive? Got a user with a very old archive whose segment size is 32k. I thought I remembered that cloning should increase the segment size. But the value is unchanged after cloning.

By the way, doing a clone in Valentina Studio makes an error message.

Any idea how to increase the segment size? Dumping and loading a dump makes those huge file sizes and it never really works.

Regards

Beatrix Willius
Attachments (3)
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Thanks! The native path worked fine.
Comment
There are no comments made yet.
This is working for me :

CLONE DATABASE TO '/Users/francoisvanlerberghe/Projets coke/Databases/new_db.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 65536;

Note the non-escape space for the folder name "Projets coke"
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Using the shell path for the new database doesn't work at all:

CLONE DATABASE TO '/Users/beatrixwillius\ 1/Desktop/max_clone.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 262144;

I really wish that there were nice error messages.
Attachments (1)
Comment
There are no comments made yet.
This is working for me too. But you have to give the whole shell path for the new db.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Strange - it works for me.
Run vStudio.app, open source db locally, do that sql, open cloned db. All the records are there, structure is also the same.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
That definitively is a bug. I'll do a bug report later.

Okay. No error message but no success either. The command now does nothing. Valentina Studio says "executing query" and there are no records copied over.

How do I make the clone? I've created the clone with a context click in Valentina Studio. Then I told Valentina Studio not to copy the records.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
There is opened connection to 127.0.0.1
Yes, you do it locally, but somehow that opened connection confuses vStudio.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
I'm working locally without vServer. Cloning in Valentina Studio also doesn't work for me with the same error. I tried again and got the same error. What am I doing differently? Please see the screenshots from my first post.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
BTW, I did it locally - not against vServer. Can you try clone without connect to vServer?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
It works on my side with some test db. What about diagnose the source db? BTW, I see some cloned db created - is it empty?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
@Ivan: nope, doesn't work. Gives me the same error as when trying to clone with the context menu. I made sure that the database is open. See screenshots. Latest Valentina Studio 11.2.5.

@François Van Lerberghe: my databases can become very large. A 32k segment size has a maximum database size of over 60 GB. Nowadays, I'm using 262k segment size. The feature of importing databases has been on my to-do list since forever. But right now it doesn't exist.
Attachments (2)
Comment
There are no comments made yet.
Hi Beatrix,

Don't know if it exist a method to modify segment size directly.
I clone the db myself in code.
Like this :

dim db As VDatabase
dim f As Folderitem
// Set f
db.Create( f, EVDbMode.kDsc_Dat_Blb_Ind, 32 * 1024 ) ' segment size = 32 k
// Create tables
// Copy records from old Database to new db

Best regards

Just curious : why do you want to increase the segment size ?

François
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
You may do it via SQL:


CLONE DATABASE TO 'new_db.vdb' WITH
SET PROPERTY "SegmentSize" of DATABASE TO 65536;
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories