Sql-server – Permission error when executing a 5.6 GB sqlcmd file

sql serversql-server-expresssqlcmd

I am trying to run a very large file through the sqlcmd command and it works perfectly with files of 100 MB up to 1.4 GB. This is what I have tested so far, but when I try to run a file which is 5.6 GB, it throws this permission error:

Sqlcmd: Error: Error occurred while opening or operating on file C:\Test\Insert_Generated_File.sql (Reason: Access is denied).

The error is thrown immediately.

Are there any limitations on SQL Server Express edition when executing large files?

Just so that everything is clear, the file contains INSERT generated statements from a 4GB database and nothing more. It is saved as a *.sql file.

The version of sql I'm using is:

Microsoft SQL Server 2014 – 12.0.2269.0 (X64)
Jun 10 2015 03:35:45
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows NT 6.3 (Build 10586: ) (Hypervisor)

All I want to know is why am I getting that error, is it because of Express Edition, or because sqlcmd cannot handle a file that large. Unfortunately, I do not own a Standard Edition of SQL Server so I cannot test it there.

I know of the SQL Express database limitations, yet I am scripting a database which is already part of my server. It would make sense if I did not have this data already in, but I do. And all the data is already in once. I just cannot recreate it using this file.

Best Answer

@Mihai, As Daniel Hutmacher already said,Express Edition is limited in database size. As per sqlmag BOL http://sqlmag.com/sql-server-2012/sql-server-2012-express-editions, if you are using SQL Server Express with Advanced Services. It is limited to 4GB and can access only the local instance.

Even in dba.stackexchange the Shanky How many users are supported on SQL Server 2012 Express? has also explain the limitation of SQL Server Express edition .