# The database file is larger than the configured maximum database size

**URL:** <https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765>\
**Category:** Version 4\
**Created:** [May 12, 2016, 4:27am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765 "2016-05-12T04:27:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Iyad](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Ahmed\_Iyad](https://forum.sambapos.com/u/Ahmed_Iyad)\
**Post date:** [May 12, 2016, 4:27am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/1 "2016-05-12T04:27:38Z")

</div>

I am getting the following error as I am trying to open POS operations:

![](https://forum.sambapos.com/uploads/default/original/3X/5/6/5692821d9401132faaf7ce0608977f01c1aa774a.PNG)

Bellow is the Detailed Report for the error:

```nohighlight
-----------------------------
[General Info]

Application: SambaPOS
Version: 4.1.58
Region: en
DB: CE
Machine: ACER
User: user
Date: 5/12/2016
Time: 1:21 PM

User Explanation:

user said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Samba.Presentation.App.Main()

Inner Exception 1
Type: System.Data.EntityCommandExecutionException
Message: An error occurred while reading from the store provider's data reader. See the inner exception for details.
Source: System.Data.Entity
Stack Trace: at System.Data.Common.Internal.Materialization.Shaper`1.StoreRead()
   at System.Data.Common.Internal.Materialization.Shaper`1.RowNestedResultEnumerator.MoveNext()
   at System.Data.Common.Internal.Materialization.Shaper`1.ObjectQueryNestedEnumerator.TryReadToNextElement()
   at System.Data.Common.Internal.Materialization.Shaper`1.ObjectQueryNestedEnumerator.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Samba.Persistance.Data.Dao.Select[TSource,TResult](Expression`1 expression, Expression`1 predictate, Expression`1[] includes)
   at Samba.Persistance.Implementations.EntityDao.UpdateEntityScreenItemBadges(IList`1 entityScreenItems)
   at Samba.Services.Implementations.EntityModule.EntityService.UpdateEntityScreenItemBadges(IList`1 entityScreenItems)
   at Samba.Modules.EntityModule.EntityDashboardViewModel.Refresh(EntityScreen entityScreen)
   at Samba.Modules.EntityModule.EntitySwitcherViewModel.ActivateDashboard(EntityScreen entityScreen)
   at Samba.Modules.EntityModule.EntitySwitcherViewModel.ActivateEntityScreen(EntityScreen entityScreen)
   at Samba.Modules.EntityModule.EntitySwitcherViewModel.<.ctor>b__2(EventParameters`1 x)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c __DisplayClass2.<GetExecutionStrategy>b__ 0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

Inner Exception 2
Type: System.Data.SqlServerCe.SqlCeException
Message: The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [Required Max Database Size (in MB; 0 if unknown) = 257]
Source: SQL Server Compact ADO.NET Data Provider
Stack Trace: at System.Data.SqlServerCe.SqlCeDataReader.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeDataReader.IsEndOfRowset(Int32 hr)
   at System.Data.SqlServerCe.SqlCeDataReader.Move(DIRECTION direction)
   at System.Data.SqlServerCe.SqlCeDataReader.Read()
   at System.Data.Common.Internal.Materialization.Shaper`1.StoreRead()

-----------------------------

[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.5.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.5.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.5.0
PropertyTools, Version=2012.4.14.1

-----------------------------

[System Info]

Operating System
-Microsoft Windows 8.1 Pro
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = -240
--FreePhysicalMemory = 1008868
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 6.3.9600

Machine
-ACER
--Manufacturer = ASUS
--Model = All Series
--TotalPhysicalMemory = 2013515776
--UserName = 

-----------------------------

```

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 12, 2016, 6:43am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/2 "2016-05-12T06:43:53Z")

</div>

Quick search indicates you might be able to increase max DB size using this connection string:

```auto
Data Source=MyData.sdf;Max Database Size=256;Persist Security Info=False;

```

Change the size accordingly… specified in MB between 16 and 4091 (4GB).

> <https://stackoverflow.com/questions/2408480/increase-the-size-of-sql-compact-3-5-sdf-file>

* * *

Even if that is possible, you really need to upgrade to SQL Express or SQL LocalDB since they support very large databases, they are more robust, and data access is far quicker. And SQL CE is no longer supported.

While you’re at it, why are you running 4.1.58? Latest V4 is 4.1.82

---

<div class="post-metadata">

**Author:** ![Ahmed\_Iyad](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Ahmed\_Iyad](https://forum.sambapos.com/u/Ahmed_Iyad)\
**Post date:** [May 12, 2016, 6:49am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/3 "2016-05-12T06:49:43Z")

</div>

Hi QMcKay,

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

![](https://forum.sambapos.com/uploads/default/original/3X/2/a/2aa527ae7426d0a41c7fd423ed268c78efc6f75d.PNG)

The connection string is as bellow:

```auto
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:

```auto
<?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>

```

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 12, 2016, 7:48am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/4 "2016-05-12T07:48:34Z")

</div>

> [@QMcKay](#):
>
> Max Database Size=256;Persist Security Info=False;

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?

---

<div class="post-metadata">

**Author:** ![Ahmed\_Iyad](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Ahmed\_Iyad](https://forum.sambapos.com/u/Ahmed_Iyad)\
**Post date:** [May 12, 2016, 8:42am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/5 "2016-05-12T08:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [May 12, 2016, 1:15pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/6 "2016-05-12T13:15:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ahmed\_Iyad](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Ahmed\_Iyad](https://forum.sambapos.com/u/Ahmed_Iyad)\
**Post date:** [May 12, 2016, 2:50pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/7 "2016-05-12T14:50:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 12, 2016, 4:06pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/8 "2016-05-12T16:06:43Z")

</div>

> [@SQL Express 2014 Installation - \[BONUS\] How to Convert from CE to SQL Express](https://forum.sambapos.com/t/sql-express-2014-installation-bonus-how-to-convert-from-ce-to-sql-express/6956):
>
> Microsoft SQL Express 2014 [SQL Express 2014 Download Link][1] Versions Available Express 32BIT WoW64\SQLEXPR32\_x86\_ENU.exe Express 32BIT\SQLEXPR\_x86\_ENU.exe Express 64BIT\SQLEXPR\_x64\_ENU.exe ExpressAdv 32BIT\SQLEXPRADV\_x86\_ENU.exe ExpressAdv 64BIT\SQLEXPRADV\_x64\_ENU.exe ExpressAndTools 32BIT\SQLEXPRWT\_x86\_ENU.exe ExpressAndTools 64BIT\SQLEXPRWT\_x64\_ENU.exe LocalDB 32BIT\SqlLocalDB.msi LocalDB 64BIT\SqlLocalDB.msi warning - MgmtStudio 32BIT\SQLManagementStudio\_x86\_ENU.exe warning - …

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 24, 2017, 10:16pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/9 "2017-01-24T22:16:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [January 24, 2017, 11:18pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/10 "2017-01-24T23:18:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 25, 2017, 12:39am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/11 "2017-01-25T00:39:17Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/c/6/c62575c0aec4108cb28696a1589a168c4252ba35.JPG)

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.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [January 25, 2017, 12:50am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/12 "2017-01-25T00:50:48Z")

</div>

You are using CE compact edition.

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 25, 2017, 12:54am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/13 "2017-01-25T00:54:37Z")

</div>

What is my solution here, please?

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [January 25, 2017, 12:59am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/14 "2017-01-25T00:59:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 25, 2017, 1:26am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/15 "2017-01-25T01:26:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RickH](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rickh/32/51960_2.png) [@RickH](https://forum.sambapos.com/u/RickH)\
**Post date:** [January 25, 2017, 2:54am UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/16 "2017-01-25T02:54:29Z")

</div>

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

> [@SQL Express 2014 Installation - \[BONUS\] How to Convert from CE to SQL Express](https://forum.sambapos.com/t/sql-express-2014-installation-bonus-how-to-convert-from-ce-to-sql-express/6956):
>
> Microsoft SQL Express 2014 [SQL Express 2014 Download Link][1] Versions Available Express 32BIT WoW64\SQLEXPR32\_x86\_ENU.exe Express 32BIT\SQLEXPR\_x86\_ENU.exe Express 64BIT\SQLEXPR\_x64\_ENU.exe ExpressAdv 32BIT\SQLEXPRADV\_x86\_ENU.exe ExpressAdv 64BIT\SQLEXPRADV\_x64\_ENU.exe ExpressAndTools 32BIT\SQLEXPRWT\_x86\_ENU.exe ExpressAndTools 64BIT\SQLEXPRWT\_x64\_ENU.exe LocalDB 32BIT\SqlLocalDB.msi LocalDB 64BIT\SqlLocalDB.msi warning - MgmtStudio 32BIT\SQLManagementStudio\_x86\_ENU.exe warning - …

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 26, 2017, 6:11pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/17 "2017-01-26T18:11:48Z")

</div>

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/8/889f302486849b3120888f4cb55ffca57b5eea1e.JPG)

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 26, 2017, 8:01pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/18 "2017-01-26T20:01:55Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/b/0/b0494d6f076f677a71472683c033f96f4999589a.JPG)

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

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [January 26, 2017, 8:27pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/19 "2017-01-26T20:27:08Z")

</div>

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

> **[The Story of Max Database Size (Connection String Parameter)](https://blogs.msdn.microsoft.com/sqlservercompact/2007/06/13/the-story-of-max-database-size-connection-string-parameter/)**
>
>   Maximum Database Size is NOT a persistent configuration (It is NOT stored in database file).  SQL CE creates shared memory to support multi-connection scenarios.  SQL CE maintains an entry for each page of the database file, in this...

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

> <https://stackoverflow.com/questions/19262910/sql-server-compact-toolbox-not-connecting-to-databases>

---

<div class="post-metadata">

**Author:** ![sahajpatel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sahajpatel](https://forum.sambapos.com/u/sahajpatel)\
**Post date:** [January 26, 2017, 8:42pm UTC](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765/20 "2017-01-26T20:42:07Z")

</div>

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/6/5/654f71beab17c598e437bdd6a8c2b516c3e995c2.JPG)

[Next page](https://forum.sambapos.com/t/the-database-file-is-larger-than-the-configured-maximum-database-size/10765.md?page=2)
