OSQL fra batfil. Hvad er forkert i dette simple script?
jeg har denne linie i en batfil:OSQL -S %computername%\INTEUMCS -U sa -P "XXXXXX" /n /i InteumBackupScript1.sql
et simpelt sql script ligger i InteumBackupScript1.sql
det ser således ud:
backup database InteumDB to disk=’c:\InteumDB.bak’ with init
backup database master to disk=’c:\master.bak’ with init
backup database model to disk=’c:\model.bak’ with init
backup database msdb to disk=’c:\msdb.bak with init
go
hvis jeg kører OSQL og copy/paster hver linie går det fint, men hvis jeg kører scriptet får jeg flg fejl:
C:\InteumCS>OSQL -S U-AMJE-C\INTEUMCS /U sa /P "Inteum" /n /i InteumBackupScr
1.sql
Msg 170, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 1
Line 1: Incorrect syntax near 'Æc:'.
Msg 170, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 2
Line 2: Incorrect syntax near 'Æc:'.
Msg 132, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 2
The label 'Æc' has already been declared. Label names must be unique within a
query batch or stored procedure.
Msg 170, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 3
Line 3: Incorrect syntax near 'Æc:'.
Msg 132, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 3
The label 'Æc' has already been declared. Label names must be unique within a
query batch or stored procedure.
Msg 170, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 4
Line 4: Incorrect syntax near 'Æc:'.
Msg 132, Level 15, State 1, Server U-AMJE-C\INTEUMCS, Line 4
The label 'Æc' has already been declared. Label names must be unique within a
query batch or stored procedure.
hvad er galt????