on 07-29-2011 3:39 PM
Hello
I am trying to make backup from DBACOCKPIT to a netowrk location.
If i go to MS SQL SERVER AGENT and define log on by a domain user i get the error
"Executed as user: GOLDENFOODS\kkoulis. Must declare the scalar variable "@location1". [SQLSTATE 42000] (Error 137) "
anybody can help with the solution?
thx
Hello,
Have you created the backup device to the network location?
SQL Server Management Studio -> Server Objects -> Backup Devices
Regards,
Eduardo Rezende
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Yes i have created it to the location which you mention and it works fine.
After if i go to SAP at the transaction DBACOCKPIT and try to run a FULL or LOG backup there, i have the following error:
SQL Job information ******************************
Jobname: SAP CCMS Log Backup of GDW [20110802094537-2-094537]
Type: TSQL
DB-Name: GDW
For Run: 20110802 09:45:37
Job history information *****************************
Stepname: CCMS-step 1
Command: declare @exeStmt nvarchar(2000) exec gdw.sap_backup_databases @dbList=
"GDW",@r3Db="GDW",@bDev="@FisticLOG2",@expDays= 27,@jobName= "SAP CCMS
Log Backup of GDW [20110802094537-2-094537]",@bkupChecksum="N",@bkupC
ompress="N",@bkupType="L",@nativeBkup="N",@exeDate = "20110802094537",
@bkupSim = "N",@format = 0,@init = 0,@bkupDb = "GDW",@unload = 0,@exeS
tmt = @exeStmt OUTPUT
Status: (failure)
Message: 2528
Severity: 15
Duration: 0 hours(s) 0 min(s) 0 sec(s)
Last msg: Executed as user: GOLDENFOODS\kkoulis. Must declare the scalar variabl
e "@FisticLOG2". [SQLSTATE 42000] (Error 137) Incorrect syntax near t
he keyword 'with'. If this statement is a common table expression, an
xmlnamespaces clause or a change tracking context clause, the previous
statement must be terminated with a semicolon. [SQLSTATE 42000] (Erro
r 319) DBCC execution completed. If DBCC printed error messages, cont
act your system administrator. [SQLSTATE 01000] (Error 2528). The ste
p failed.
<----
End of Job Step History -
>
thx in advance
Hello,
When I create a t-log backup the declare looks like the following:
declare @exeStmt nvarchar(2000) exec sid.sap_backup_databases @dbList="SID",
@r3Db="SID",@bDev="MY_BACKUP_DEVICE_TLOG",...
In your case:
declare @exeStmt nvarchar(2000) exec gdw.sap_backup_databases @dbList="GDW",
@r3Db="GDW",@bDev="@FisticLOG2",...
Have you created your backup device as "@FisticLOG2"? Can you recreate it without the "@" symbol?
Regards,
Eduardo
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.