Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to run a .sql file in SQL Server 2005 Express Edition.

How to run a .sql file in SQL Server 2005 Express Edition.

Scheduled Pinned Locked Moved Database
databasesql-serveroraclesysadminhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paramhans Dubey
    wrote on last edited by
    #1

    Hi All, I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it? Thanx in advance for any kind of help. Regards, Paramhans Dubey.

    O C P 3 Replies Last reply
    0
    • P Paramhans Dubey

      Hi All, I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it? Thanx in advance for any kind of help. Regards, Paramhans Dubey.

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      You'll need the Sql Server Express Management Studio if you want the official IDE to do this stuff in.

      1 Reply Last reply
      0
      • P Paramhans Dubey

        Hi All, I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it? Thanx in advance for any kind of help. Regards, Paramhans Dubey.

        C Offline
        C Offline
        Craster
        wrote on last edited by
        #3

        You certainly can. Use the sqlcmd.exe[^] command line utility.

        1 Reply Last reply
        0
        • P Paramhans Dubey

          Hi All, I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it? Thanx in advance for any kind of help. Regards, Paramhans Dubey.

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          You can run them using the osql tool. Use osql -S (local)\Server -i <<filename.sql>>. There are other switches you may need to set such as the user id and password. To find out what the options are, type in osql /?.

          Deja View - the feeling that you've seen this post before.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups