DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Command To Execute Script File From Command Prompt

01.28.2012
| 1959 views |
  • submit to reddit
        // command to execute script file from command prompt


script for SQL server

sqlcmd -i c:\<scriptfilepath>.sql -S <yoursevername> -U <userId> -P sasasasa -d <yourdatabase>

Press enter

script for Oracle

sqlplus <username>/<password>@Hoststring" "scriptfilepath"