Select @@version
An example of the output of this query is as follows:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Express Edition (64-bit) on Windows NT 6.1(Build 7600: )
Linux Unix MySQL MSSQL Windows Virtuozzo MRTG SNMP SMTP ASP.NET PHP IIS News IT Apache Parallels Plesk CommuniGate GNU GNOME KDE Solaris HP-UX FreeBSD RedHat Fedora CentOS Howto Database Replication Disaster Recovery High Availability High Performance Cluster Dynamic Cluster HTTP Proxy Squid Email Groupware Collaboration Instant Messenger Voice over IP VoIP IPSec Tunnel VPN Sniffer Software System Engineer Programmer Programming Certified SSL PKI Authentication script
Select @@version
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Express Edition (64-bit) on Windows NT 6.1(Build 7600: )

EXEC sp_dropserver 'oldservername'
GO
EXEC sp_addserver 'newservername' , 'local'
GO
DECLARE @srv sysname
SET @srv = CAST(SERVERPROPERTY('ServerName') AS sysname)
UPDATE sysjobs SET originating_server = @srv
WHERE originating_server = ''
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\FRESH\MSSQLServer\ResourceMgrIDSQL Server 2005 is quite different from SQL Server 2000. To truncate log file is one thing which is different from SQL Server 2000. In SQL Server 2000, you just use Shrink to whatever file size you like. In SQL Server 2005, sometimes I cannot shrink the log file at all.
Here I want to describe some tricks to truncate log file for a database in SQL Server 2005. The work environment is Microsoft SQL Server Management Studio.
I found out this trick:
Immediately after I use the SSIS package or Import the data to the database (highlight the database->Tasks->Import data …), or Export the data from the database (highlight the database->Tasks->Export data …), I can shrink the log file to the desired size, for example, 1MB. That is, highlight the database->Tasks->Shrink->Files , set the file size, say, 1MB.
Then, click OK and you are done.
Sometimes, we just do not need the big log file. For example, I have a 40GB log file. I am sure I do not need this log file and want to get rid of it completely to free up the hard drive space. The logic is:
Let’s say, the database name is testDev. In the SQL Server Management Studio,
testDev, highlight the log file and click the ‘Remove’ button. This means you only attach testDev.mdf This way we can safely delete the log file and free up the space.
Reference Site: http://www.codeproject.com/KB/database/truncate_log_SQL_server.aspx
For shared SQL Server installations, SSMS will allow all customers to see the names of other databases. You can change that default behavior with a SQL Server 2005 configuration change.
To do so, on your SQL 2005 servers, revoke "View Any Database" from public. Then, customers of a shared server, will only see their database, provided you've made the customer the owner of the database. An easy way to do this is with the stored procedure sp_changedbowner or with Alter Database.