Make IT Complete

Technical Ramblings From an IT Professional

Entries for the ‘SQL Server’ Category

Rename SQL Server

During the migration of SQL databases to a new SQL Server we find that we must rename the SQL Server to the original server name.  Renaming a machine on the network is easy eough but we must also run a T-SQL script to rename the server in MS-SQL
To correct @@SERVERNAME for a default instance use [...]

Really Helpful Post about Connection Strings

http://www.connectionstrings.com/sql-server-2005

Design Pattern for Database Incremental Loads.

http://vsteamsystemcentral.com/cs21/blogs/applied_business_intelligence/archive/2007/05/21/ssis-design-pattern-incremental-loads.aspx

Where does a SharePoint Server Store the Name of the Config Database

WSS 2.0 and SPS 2003:      HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\Secure\ConfigDb
WSS 3.0 and MOSS 2007:   HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb

List all the databases on SQL Server

List all the database on SQL Servers.
—-SQL SERVER 2005 System Procedures
EXEC sp_databases
EXEC sp_helpdb

—-SQL 2000 Method still works in SQL Server 2005
SELECT name
FROM sys.databases

SELECT name
FROM sys.sysdatabases

Moving SharePoint Content Databases

- External SQL Server Database Move

 Log Shipping Method(low impact)

To migrate your content database from 1 SQL Server to another there are a few choices, your choice will depend on how much downtime you are willing to take.  First option being you can setup SQL Log shipping, Once your 2 databases are in sync you would [...]

Reconnect SQL User Logins

I find this useful when restoring a SQL database and then needing to reconnect the database use to the login account.
This used to be a pain to fix, but currently (SQL Server 2000, SP3) there is a stored procedure that does the heavy lifting.
All of these instructions should be done as a database admin, with [...]

Moving a MS-SQL Database

The following example moves a database that is named mydb. This database contains one data file, Mydb.mdf, and one log file, Mydblog.ldf. If the database that you are moving has more data files or log files, specify the files in a comma-delimited list in the sp_attach_db stored procedure. The sp_detach_db procedure does not change regardless [...]

Database Maintenance Plans and Backup Exec

Assuming you have the SQL Agent installed on your media server then yes Backup Exec will / can backup your live SQL databases.
From a DR point of view you don’t need the Maintenance Plan jobs, however if you have the storage capacity available I personally would recommend keeping them, simply due to the ease in [...]

Shrinking SABA Log files

We have SABA for our learning management system and from time to time the log files get out of control.
This script will shrink them
USE Saba_prod_tp2;
GO
– Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE Saba_prod_tp2
SET RECOVERY SIMPLE;
GO
– Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (tp2_Log, 10);
GO
– Reset the database recovery [...]