CColorDialog Dlg;
Dlg. DoModal ();
M_crcurcolor = dlg. GetColor ();//colorref M_crcurcolor;
BYTE r = getrvalue (M_crcurcolor);
BYTE g = Getgvalue (M_crcurcolor);
BYTE B = Getbvalue (M_crcurcolor);
Database backup
Declare @name varchar (250)
EXEC Master. xp_cmdshell ' echo d:\ &cd d:\ &d: &if not exist database MD database '
Set @name = ' D:\database\naneXXXX _ ' +
CONVERT (varchar), GETDATE (), () + '. Bak '
BACKUP DATABASE nanexxxx to
[Email protected]
With Noformat, Noinit,
NAME = N ' nanexxxx-full database backup ',
SKIP, Norewind, Nounload
There are no problems to find ... xp_cmdshell Workaround:
SQL Server blocked access to the process ' Sys.xp_cmdshell ' for component ' xp_cmdshell ' because this component has been used as this server
Select the master database to execute the following statement
sp_configure ' show advanced options ', 1
Reconfigure
Go
sp_configure ' xp_cmdshell ', 1
Reconfigure
Go
Deleteoldbackup
DECLARE @OLDDATE DATETIME
EXEC Master. xp_cmdshell ' echo d:\ &cd d:\ &d: &if not exist database MD database '
SELECT @OLDDATE =getdate ()-7
EXECUTE master.dbo.xp_delete_file 0,n ' D:\database ', N ' bak ', @olddate
Shrink Log
Dump transaction nanexxxx with NO_LOG;
Backup log nanexxxx with no_log;
DBCC SHRINKFILE (2);
MFC calls the System palette and database backup and shrink logs