Posts

Showing posts from November, 2012

Which File System in AIX do you have?

Image
Hi, Before you make any operation you must know the AIX file system, How to ; Method 1: login with root lsvg -l rootvg then you decide file system , journal or enhanced journal fs.

After Moving SQL System Databases

Hi All, if you moved sql server system database other than default location then you wont be able to start SQl Server Agent Services in failover cluster environment.I was trying to install SQL Server Agent Services in failover cluster but the setup did not complete succesfuly.upon further investigation this issue caused dns entry and regedit You should make this, After attempting to upgrade one of my servers to SQL Server 2008/2012 I found that the installer would error on installing the database engine.  The messge was: “The Database Engine system data directory in the registry is not valid.” I found the installer looks in  HKLM\software\microsoft\microsoft sql server\%instance_name%\setup\SQLDataRoot to discover the path to the system databases.  This key was created during the 2008 R2 installation and the files were subsequently moved so what was created at install time is no longer correct. If you modify this key to the path configured in the...

Search (Sp). Character or Word in SQL Server

Hi All, Today has a different demand.The customer asked special characters in database. firstly I created stored procedure as below.Then you run the procedure like I write. Important point is you must configure db collation before you run in searchalltables. *Für Deutsch versionen müssen sie fragen auf mich.Ich helf ihnen gern. Create this procedure in the required database and here is how you run it: --To search all columns of all tables in Pubs database for the keyword "Computer"   EXEC SearchAllTables 'Computer' GO *************************************************************************** Here is complete stored procedure, copy all code to query to run. CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) SET NOCOUNT ON DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110) SET @TableName = '' SET @S...

How to move system databases in SQL Server 2008

To move the model, msdb and tempdb databases: Single user mode is no longer necessary, neither is the 3608 trace flag. Now its a simple alter command: --Move Model Database USE master ; GO ALTER DATABASE model MODIFY FILE ( NAME = modeldev , FILENAME = 'E:\DATA\model.mdf' ); GO ALTER DATABASE model MODIFY FILE ( NAME = Modellog , FILENAME = 'E:\DATA\modelLog.ldf' ); GO --Move MSDB Database USE master ; GO ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBData , FILENAME = 'E:\DATA\MSDBData.mdf' ); GO ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBLog , FILENAME = 'E:\DATA\MSDBLog.ldf' ); GO --Move Tempdb Database USE master ; GO ALTER DATABASE tempdb MODIFY FILE ( NAME = tempdev , FILENAME = 'E:\DATA\tempdb.mdf' ); GO ALTER DATABASE tempdb MODIFY FILE ( NAME = templog , FILENAME = 'E:\DATA\tempLog.ldf' ); GO Stop the instance, physically move the model and msdb files to the new location, and restart the instance. Te...