I am trying to migrate from SQL SERVER 2012 to 2014 and found out I cannot use .bak files because of different versions. I know how to create a .sql back up file using the SSMS but I can't find a solution using a script or sqlcmd.
turns out I could use .bak files to restore databases. The problem was I'm trying to restore the file from a directory that SSMS is not authorized. Was a silly mistake. Sorry.
Why can't you use SSMS?
Exporting to .sql file has been discussed in How to backup Sql Server to sql file?
Did you consider Linked Servers ? You can use 3 and 4 part names to access data from one server to another, for details see How can I connect to an external database from a sql statement or a stored procedure? . Another alternative to access data is trough OPENROWSET, that is also discussed above.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.