Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2084

Re: Easy way to copy database from MsSQL Express to MsSQL-Server?

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Easy way to copy database from MsSQL Express to MsSQL-Server?
Date 2021-04-19 22:53 +0200
Organization Erland Sommarskog
Message-ID <XnsAD11E8F149422Yazorman@127.0.0.1> (permalink)
References <s5h3hp$o41$1@tota-refugium.de> <XnsAD10ECA229243Yazorman@127.0.0.1> <s5koma$7vs$1@tota-refugium.de>

Show all headers | View raw


Tim Ritberg (tim@server.invalid) writes:
> Can't login today. The server instance is a Linux MsSQL 15.
> On Desktop is a (Express) SQL Server 2016 SP1.
> 

So the server is of a later version that the the Express instance. That's
good, because then you can use BACKUP/RESTORE.

BACKUP DATABASE db TO DISK = 'C:\temp\backup.bak' WITH INIT

And then on the server:

RESTORE DATABASE db FROM DISK = '/path/backup.bak'
WITH MOVE 'db' TO '<path>',
     MOVE 'db_log' TO '<path>'

When it comes to the names that follow MOVE, these are the logical names of 
the devices. They often follow the pattern shown here, but this is not
always the case. Run sp_helpdb on the database on the source server to
see the names. They are in the first column of the second result set.

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Easy way to copy database from MsSQL Express to MsSQL-Server? Tim Ritberg <tim@server.invalid> - 2021-04-18 13:01 +0200
  Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Erland Sommarskog <esquel@sommarskog.se> - 2021-04-18 23:15 +0200
    Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Tim Ritberg <tim@server.invalid> - 2021-04-19 22:20 +0200
      Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Erland Sommarskog <esquel@sommarskog.se> - 2021-04-19 22:53 +0200
        Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Tim Ritberg <tim@server.invalid> - 2021-04-19 23:25 +0200
          Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Erland Sommarskog <esquel@sommarskog.se> - 2021-04-20 20:44 +0200
            Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Tim Ritberg <tim@server.invalid> - 2021-04-20 22:56 +0200
              Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Erland Sommarskog <esquel@sommarskog.se> - 2021-04-21 20:25 +0200
                Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Tim Ritberg <tim@server.invalid> - 2021-04-21 21:23 +0200
                Re: Easy way to copy database from MsSQL Express to MsSQL-Server? Erland Sommarskog <esquel@sommarskog.se> - 2021-04-22 21:20 +0200

csiph-web