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?

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
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 Mon, 19 Apr 2021 22:53:57 +0200
Organization Erland Sommarskog
Lines 22
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>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info reader02.eternal-september.org; posting-host="1934056a573a461c33e93246c801847a"; logging-data="26829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xV6Y6Hbh6zYsBIf2i11nd"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:IsQkECcMW5fBKwbKW5odaNQ0vIo=
Xref csiph.com comp.databases.ms-sqlserver:2084

Show key headers only | 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