open SSMS – right click on the Server – Properties – Database Settings – Database Default Locations good idea to not have your databases on the c drive
Month: December 2010
Quick summary: RTM (Gold, no SP) SP1 SP2 SP3 SP4 SQL Server 2011 codename Denali – SQL Server 2008 R2 codename Kilimanjaro 10.50.1600.1 SQL Server 2008 codename Katmai 10.00.1600.22 10.00.2531 10.00.4000 SQL Server 2005 codename Yukon 9.00.1399.06 9.00.2047 9.00.3042 9.00.4035 9.00.5000 SQL Server 2000 codename…
Major Builds Version Build KB Article Service Pack 2 for SQL Server 2008 10.0.4000.00 968369 Service Pack 1 for SQL Server 2008 10.0.2531.00 968369 RTM 10.0.1600.22 N/A Build KB Article Title Description 10.0.4266.00 2289254 SQL Server 2008 SP2 CU 1 The first CU after SQL…
select @@Version SELECT SERVERPROPERTY(‘productversion’), SERVERPROPERTY (‘productlevel’), SERVERPROPERTY (‘edition’)
use msdb exec sp_send_dbmail @profile_name = ‘ss job notifications’, @recipients = ‘put email address here’, @subject = ‘live database sizes’, @query = ‘use databasename select db_name(dbid),str(convert(dec(15),sum(size))* 8192/ 1048576,10,2)+ N” MB” as Size from sys.sysaltfiles group by dbid order by 2 desc’, @attach_query_result_as_file = 1;
put two single quotes where there was one ie – ‘string ‘inside’ of something’ then do this – ‘string ”inside” of something’ — 2 single quotes not a double quote
if you are trying to restore a database from a backup file that is on a network server… the sql server service needs to be running under a domain account that has privileges to the network share you are trying to retrieve the backup file…
–date conversion methods: also 127 in ics file select convert(varchar, GetDate(), 100) as ‘100 Conversion’, — Dec 21 2010 3:13PM convert(varchar, GetDate(), 101) as ‘101 Conversion’, — 12/21/2010 convert(varchar, GetDate(), 102) as ‘102 Conversion’, — 2010.12.21 convert(varchar, GetDate(), 103) as ‘103 Conversion’, — 21/12/2010 convert(varchar,…
you can restart sql server agent during business hours, but make sure that it won’t be stopped when a scheduled job is set to run.