Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: How to backup SQL Express 13 Date: Wed, 11 May 2022 22:42:16 +0200 Organization: Erland Sommarskog Lines: 22 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="afe98d9be514e7c3c8cf8f59de4bdb02"; logging-data="27312"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/rsASbMoH7eWFoIWk/1P/" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:Wi7/Y0S491pm/Hl1ssM6mw2urV0= Xref: csiph.com comp.databases.ms-sqlserver:2145 Tim Ritberg (tim@server.invalid) writes: > I startet Server Manager Studio as local admin and created a user for sql. > > This is my backup command: > sqlcmd -U remotebackup -P foobar -S tcp:office2,49762 -Q "BACKUP > DATABASE [contura] TO DISK = 'testback' WITH NOFORMAT, NOINIT, NAME = > 'demodb-full', SKIP, NOREWIND, NOUNLOAD, STATS = 10" > > Strange that port 49762 and backup went into a sqlserver subfolder. I > guess sql server can't write directly to net shares. The port number is instead of the instance name. Which you need if the Browser server is not running or blocked by firewall. It went to that folder, because you did not specify the full path. You can change the default path from SSMS under Server Properties, but I don't really recommend that. SQL Server can write to net shares - but the service account for SQL Server needs to have write access to the share.