Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:37:25+00:00 2026-06-17T12:37:25+00:00

I have a 4GB sql data script of my database. I want to execute

  • 0

I have a 4GB sql data script of my database. I want to execute it but SQL Server Management Studio does allow me to do it because it’s a very big file.

So I want to split this file into smaller files so that I can execute it. I have googled it but didn’t get any good solutions. I have also used HJSplit to split the files but only first split file is in correct format but others are not in correct format due to which can not be execute in SQL query Interface.

Please help me guys how can I execute this .sql file with data with or without splitting?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:37:26+00:00Added an answer on June 17, 2026 at 12:37 pm

    use the sqlcmd tool to execute the file..

    sqlcmd -S myServer\instanceName -i C:\myScript.sql
    

    or

    sqlcmd -S <server> -i C:\<your file here>.sql -o
    

    Just replace with the location of your SQL box and with the name of your script. Don’t forget if you’re using a SQL instance the syntax is:
    sqlcmd -S \instance.

    Here is the list of all arguments you can pass sqlcmd:

    Sqlcmd            [-U login id]          [-P password]
      [-S server]            [-H hostname]          [-E trusted connection]
      [-d use database name] [-l login timeout]     [-t query timeout] 
      [-h headers]           [-s colseparator]      [-w screen width]
      [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
      [-c cmdend]            [-L[c] list servers[clean output]]
      [-q "cmdline query"]   [-Q "cmdline query" and exit] 
      [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
      [-u unicode output]    [-r[0|1] msgs to stderr]
      [-i inputfile]         [-o outputfile]        [-z new password]
      [-f  | i:[,o:]] [-Z new password and exit] 
      [-k[1|2] remove[replace] control characters]
      [-y variable length type display width]
      [-Y fixed length type display width]
      [-p[1] print statistics[colon format]]
      [-R use client regional setting]
      [-b On error batch abort]
      [-v var = "value"...]  [-A dedicated admin connection]
      [-X[1] disable commands, startup script, enviroment variables [and exit]]
      [-x disable variable substitution]
      [-? show syntax summary]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net 2 asp.net websites hosted on windows 2003 server. My database(sql server
I have a table on SQL Server 2005 that was about 4gb in size.
I have a SQL Server 2005 database and I have 4 GB of text
I have this ASP.NET/SQLServer2005 website running on a production server (Win2003, QuadCore, 4GB). The
I have a large CSV file (5.4GB) of data. It's a table with 6
I really need a free database which supports encryption, but doesn't have size limitations
This question might be kind of elementary, but here goes: I have a SQL
I have a couple of stored procedures on SQL Server 2005 that I've noticed
I have been trying for quite a while to import a large (4GB) sql
I have a slow query in SQL Server 2005. It has 3 inner joins

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.