1

Topic: Implementation a DB in MS SQL 2012 Express

Good afternoon.
From the console I try to cause commands of reserve copying of a DB, so:
SQLCMD-S "WIN-PHAD\SQLEXPRESS"-E-Q "BACKUP DATABASE 1c_unf TO DISK = ' Z:\1c_unf_monday.bak ' WITH INIT, NOFORMAT, SKIP, NOUNLOAD"
And so:
SQLCMD-S "WIN-PHAD\SQLEXPRESS"-U sa-P "pass@word"-Q "BACKUP DATABASE 1c_unf TO DISK = ' Z:\1c_unf_monday.bak ' WITH INIT, NOFORMAT, SKIP, NOUNLOAD"
In both cases I receive:
The message 102, level 15, state 1, server WIN-PHAD\SQLEXPRESS, line 1
Wrong syntax about a construction "1".
What do I do not so?

2

Re: Implementation a DB in MS SQL 2012 Express

Nezhnayka;
At you the name of basis begins with digit. Envelop a name in square brackets

3

Re: Implementation a DB in MS SQL 2012 Express

SQLCMD-S "WIN-PHAD\SQLEXPRESS"-E-Q "BACKUP DATABASE ` 1c_unf ` TO DISK = ' Z:\1c_unf_monday.bak ' WITH INIT, NOFORMAT, SKIP, NOUNLOAD"
Tried so to envelop here, produces the same error. In double quotes not clearly how to envelop, after all the line of request is wrapped in double quotes.
In the unary turned:
SQLCMD-S "WIN-PHAD\SQLEXPRESS"-E-Q "BACKUP DATABASE ' 1c_unf ' TO DISK = ' Z:\1c_unf_monday.bak ' WITH INIT, NOFORMAT, SKIP, NOUNLOAD"
Other error:
Wrong syntax about a construction "1c_unf".

4

Re: Implementation a DB in MS SQL 2012 Express

SQLCMD-S "WIN-PHAD\SQLEXPRESS"-E-Q "BACKUP DATABASE [1c_unf] TO DISK = ' Z:\1c_unf_monday.bak ' WITH INIT, NOFORMAT, SKIP, NOUNLOAD"

5

Re: Implementation a DB in MS SQL 2012 Express

, already something with this server so  that I read between lines, square brackets perceived as double.
Made, now here such error produces:
It is impossible to open the backup device ' Z:\1c_unf_monday.bak '. An error of an operating system 3 (The system cannot find the path specified.).
To what this error can be connected? I understand, what probably with the rights, it turns out SQL the server should start from the user with the Administrator the rights? At setting and after setting changed nothing, all was installed on a default.

6

Re: Implementation a DB in MS SQL 2012 Express

Z is a physical disk on a database server?

7

Re: Implementation a DB in MS SQL 2012 Express

Konst_One;
Network, but tried instead of Z: to deliver a C: (physical), changes nothing, the same error

8

Re: Implementation a DB in MS SQL 2012 Express

Nezhnayka;
In a root With: it is impossible to write.

9

Re: Implementation a DB in MS SQL 2012 Express

Nezhnayka wrote:

Konst_One;
Network, but tried instead of Z: to deliver a C: (physical), changes nothing, the same error

xp_fixeddrives What disks produces?

10

Re: Implementation a DB in MS SQL 2012 Express

Kolosov wrote:

Nezhnayka;
In a root With: it is impossible to write.

It is impossible to write nevertheless access denied;
And at it generally the way does not see.
Both at whom it and from what it is impossible to write it to a root?

11

Re: Implementation a DB in MS SQL 2012 Express

Disks  it is necessary a command map

12

Re: Implementation a DB in MS SQL 2012 Express

Nezhnayka wrote:

Network, but tried instead of Z: to deliver a C: (physical), changes nothing, the same error

1. You connected a network drive for the security account, and a SQL Server, working under the, about it can anything and not know.
2. Even if learns, it will "climb" there under the rights, instead of under yours. And they can essentially differ.
Do  in a separate directory of a local disk with the full access for the security account from under which you is launched MSSQL. And a file then copy OS means.

13

Re: Implementation a DB in MS SQL 2012 Express

Changed a way to the general documents C:\Users\Public\Documents \, all turned out. Many thanks to all!

14

Re: Implementation a DB in MS SQL 2012 Express

Yasha123;
The Windows  do not allow to write to a system disk root.