Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I wanted to restore my SQL DB, backup was taken from 2008 R2 but I have 2008 in my system.
I thus generated script of complete DB with data. Script size being huge it can not be opened.
Can someone help with command that does restore from cmd prompt.

I do remember broken syntax

sqlcmd - e (missing part which had server name and db name) filename.sql
Posted

okyeeee, try this...

SQL
i m writing a command by which you can execute any sql query(largest)...


C:\Program Files\Microsoft SQL Server\90\Tools\Binn>OSQL.exe -E -Syourserverip\sqlinstance -i"c:\my sqlfile.sql"


e.g.

C:\Program Files\Microsoft SQL Server\90\Tools\Binn>OSQL.exe -E -S192.168.1.1\SQLExpress -i"c:\my sqlfile.sql"
 
Share this answer
 
Comments
ersumitsahu 1-May-13 6:25am    
I tried but it did not help
what you have to try ? write down here........
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900