The database file is larger than the configured maximum database size

Hi QMcKay,

Thank you a lot for the quick response. I have tried changing the connection string and I get the following error:

The connection string is as bellow:

Data Source=C:\Users\user\Documents\SambaPOS4\SambaPOS41.sdf;Max Database Size=600;Persist Security Info=False;

Also here is the contents of Samba Settings.txt file:

<?xml version="1.0"?><SettingsObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MessagingServerPort>8080</MessagingServerPort>
<ConnectionString>Data Source=C:\Users\user\Documents\SambaPOS4\SambaPOS41.sdf;Max Database Size=600;Persist Security Info=False;</ConnectionString>
<StartMessagingClient>false</StartMessagingClient>
<DefaultHtmlReportHeader>
&lt;style type='text/css'&gt; 
html
{
  font-family: 'Courier New', monospace;
  font-size: 11px;
} 
&lt;/style&gt;
</DefaultHtmlReportHeader>
<CurrentLanguage>en</CurrentLanguage>
<OverrideLanguage>false</OverrideLanguage>
<OverrideWindowsRegionalSettings>false</OverrideWindowsRegionalSettings><DefaultRecordLimit>100</DefaultRecordLimit>
<WindowScale>1</WindowScale><FooterHeight>0</FooterHeight>
<UseBoldFonts>false</UseBoldFonts>
<ValidateExitButton>false</ValidateExitButton>
<AllowMultipleClients>false</AllowMultipleClients>
<CallerIdDeviceName /><ScaleDeviceName />
<AdditionalDevices>[]</AdditionalDevices>
<AutoMigrate>true</AutoMigrate>
<TokenLifeTime />
</SettingsObject>

First thing to try would be to remove those parts of the Connection String to see if you go back to getting your original error, or if you get the new error.

If you get the original error after removing those parts, then it might be that SambaPOS does not support those parameters in your connection string.

If you still get the new error after removing those parts, then there is a problem finding the DB in that path.

What was your original Connection String before you tried changing it? Did it always include the Path? Or just the Filename?

It always contained the full path since the beginning, as we wanted to take a full backup of the database folder manually using windows task scheduler. Prior to the changes following was the settings file:

<?xml version="1.0"?><SettingsObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" 

xmlns:xsd="http://www.w3.org/2001/XMLSchema"><MessagingServerPort>8080</MessagingS

erverPort><ConnectionString>Data Source=C:\Users\user\Documents

\SambaPOS4\SambaPOS41.sdf</ConnectionString><StartMessagingClient>false</StartMess

agingClient><DefaultHtmlReportHeader>
&lt;style type='text/css'&gt; 
html
{
  font-family: 'Courier New', monospace;
  font-size: 11px;
} 
&lt;/style&gt;</DefaultHtmlReportHeader><CurrentLanguage>en</CurrentLanguage><Over

rideLanguage>false</OverrideLanguage><OverrideWindowsRegionalSettings>false</Overr

ideWindowsRegionalSettings><DefaultRecordLimit>100</DefaultRecordLimit><WindowScal

e>1</WindowScale><FooterHeight>0</FooterHeight><UseBoldFonts>false</UseBoldFonts><

ValidateExitButton>false</ValidateExitButton><AllowMultipleClients>false</AllowMul

tipleClients><CallerIdDeviceName /><ScaleDeviceName /><AdditionalDevices>

[]</AdditionalDevices><AutoMigrate>true</AutoMigrate><TokenLifeTime 

/></SettingsObject>

Once the following of the connection string are removed the program opens fine.

Max Database Size=256;Persist Security Info=False;

However once POS is clicked it shows the same exact previous error which says that the database is larger than max configured. Also I found out that on the connection string if I just key in the database file name it creates a total new database on the application path located under Program files. And once again when I key in the Max Database Size into the connection string application returns with an error that it cannot connect to the database.

Please advice.

Best advice is to upgrade to sql express and convert your CE to sql also update to current version 4.1.82

Hi kendash,
Thank you a lot for the feedback, I guess that should be better.

Can I please have a guide to migrate the existing database to SQL and upgrade of the software to the mentioned version. And I really need it urgent as the service has been down for more than an 48hrs now.

1 Like

How do i check what database platform is my Samba running on?

Login as admin and double click on samba logo in lop left.
There is a suffix on the window title bar showing the DB type.

Mines showing this. What do i make of that. Sorry for my less technical skills.

I started having issues as this thread indicates problem. Really feeling overwhelmed with solution.

Looking for guide to resolve. Any help is appreciated.

You are using CE compact edition.

What is my solution here, please?

It’s explained in the thread your responding too. Qmckay provided a link a few threads up.

Thanks.

I am a bit dull in this area of field.

Do i need to open samba database file (.sdf) in sql management studio to edit that string?

I have not seen tutorial added showing how to open which file to add that string.

You need to follow the guide posted above to convert your CE database to full SQL

All the info you need is posted in a full tutorial above

I am in the middle of installation. SQL Installation was completed.

I am trying to migrate CE to SQL express.

Encountering error with standalone 3.7 SQL Server compact 4.0 keep hanging up on me. Please help.

Finally got past the point of SQLCEToolbox getting hung. Now having issue due to Max DB limitation.

Apparently the Max Size has nothing to do with the DB itself; rather it is a default Memory allocation.

In any case, you should be able to configure the Max Size parameter when you define the connection to the Database File (SDF).

Thanks QMckay. That worked, i just changed value from 256 to 500 and output ran.

Now the problem i encounter is it exported more then 25 files instead of one per instruction on migrating. Which one should i use to copy and paste query.

Ive only done this once and ended up with maybe 5-6 files, I imported them one by one if I remember right.
Probably dependent on how long you ran in CE and how much sales history you have.

Sale history is 2-3 years.

I just copied the first file in SQL management studio. Created New Database and created query.

Now what do i need to do ?