4

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.

  • 1
    Express Edition is limited in database size. The limitation varies between versions of SQL Server. Also, any error message and relevant schemas are helpful if you want a good answer to your question - use the "edit" link on the lower-left of the question to update. – Daniel Hutmacher Jan 26 '16 at 10:08
  • 1
    Sounds as if sqlcmd can't handle files larger than 4GB but I don't think this has something to do with the express edition. Do you have a standard or enterprise edition around to verify that that sqlcmd can open that file? – a_horse_with_no_name Jan 26 '16 at 10:40
-2

@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 .

  • 1
    The limitation on the DB size in 2012 is 10 GB, not 4 GB. You've probably confused that with something else. – Andriy M Jan 26 '16 at 10:37
  • @AndriyM, Thanks for reminder. I have clear picture after the post of shanky. I had already asked related to this topic. Even i would like to say at this point "The Reporting Services implementation in SQL Server Express with Advanced Services is limited to 4GB and can access only the local instance." – Md Haidar Ali Khan Jan 26 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.