如何使用命令行使用日期/时间戳备份sybase数据库?
看到有人发布了这种方法:
声明@pvm varchar(30),@ dumptorun varchar(300),@ dbname varchar(70)选择@ pvm =(CONVERT(…
declare @pvm varchar(30), @dumptorun varchar(300), @dbname varchar(70) select @pvm=(CONVERT(varchar(30), GETDATE(), 112)) select @dbname='TOB' select @dumptorun = 'dump database '+@dbname+' to /backup/DB/'+@dbname+'_'+@pvm+'.dmp' select @dumptorun EXEC ( @dumptorun ) go
Msg 102, Level 15, State 181: Server 'SOL', Line 1: Incorrect syntax near '/'.