Results 1 to 1 of 1
Sep 17, 2012, 11:16 #1
- Join Date
- Feb 2003
- Florida, USA
- 1 Post(s)
- 0 Thread(s)
Backup and Restore of MSSQL via command line
Hey all, I have MS SQL 2008 R2 SP2 Developer at work and MS SQL 2012 Developer at home. When I created the DB initially at home, I made it "2008 compatible", however when I try to restore the .bak to my work, it states "Specified cast is not valid". Not sure what it means, as Google searches have only yielded speculations that a datatype in the home DB isn't compatible with the work enterprise manager. (even though I specified 2008 compatibility at home).
Aside from that, I was wondering if it was possible to do a BACKUP / RESTORE command from the command line? I currently move work project files to/from work/home and I have a batch file that movs project files, creates/deletes folders as needed, but I can't just copy/overwrite MDF/LDF files, I'm sure.
Thanks in advance for the help.