Sample columns
date_col:
2007-05-06 00:00:00.000
time_col:
1971-01-01 01:06:23.000
Use this…
DATEADD(hh ,DATEPART(hh, [time_col]]), DATEADD(n ,DATEPART(n, [time_col]) , DATEADD(ss ,DATEPART(ss, [time_col]) , [date_col])))
To get this…
2007-05-06 01:06:23.000
RESTORE DATABASE SharePoint_Jeff FROM DISK = 'D:\SharePoint_Content_db_200705072120___jeff_restore.BAK' WITH MOVE 'SharePoint_Content' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\SharePoint_Jeff_Data.MDF', MOVE 'SharePoint_Content_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\SharePoint_Jeff_Log.LDF', STATS = 1, REPLACE GO
DECLARE @dbsize DEC(15,0) DECLARE @freespace DEC(15,0) DECLARE @spaceused DEC(15,0) SELECT @dbsize = SUM(CONVERT(DEC(15),SIZE)) FROM sems_teas5.dbo.sysfiles SELECT database_name = 'YOUR_DB_NAME', database_size = (@dbsize / 128), spaceused=(SELECT (SUM(CONVERT(DEC(15),reserved))/128) FROM sems_teas5..sysindexes WHERE indid in (0, 1, 255))
The following command will encrypt your connection sting in your web.config file. The connection string must all ready be in place.
For C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
-pkm switch encrypts the machine.config rather and web.config (default).
aspnet_regiis.exe -pef "connectionStrings" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config" -prov "DataProtectionConfigurationProvider"