Category Archives: SQL

Issues ,Solutions, News related with SQL

SQL 2005 and 2008 connectivity Issues After Changing the System Name (Computer Name)


Hi All,

In My  experience I have faced so many SQL issue due to the Change of System Name (Computer Name) after installed and configured SQL server .Some of the issues are like the followings

  • Not able to login with the Instance Name
  • Not able to create or edit publications

When we tried to work with publication we might get the following errors

“SQL Server is unable to connect to server ‘ServerName’

Additional information: SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘Server Name’. (Replication. Utilities)”

So when Ever we need a change in the name of the System which we installed SQL Server

Use the following Query and stored procedure to update in in the SQL schema

Query to check the current System Name with SQL

Select @@servername

And if you get the null value or the old value, use the followings to update the same

Use Master
go
exec Sp_DropServer ‘OldName’
go
Use Master
go
exec Sp_Addserver ‘NewName’, ‘local’
go

Or Just use it as simple

Type   Sp_DropServer ‘OldName’

and press Execute or F5

Type  Sp_Addserver ‘NewName’, ‘local’

and press Execute or F5

Then stop and Start SQL Services

Cheers…!!!

Leave a comment

Filed under SQL, Uncategorized

Convert SQL 2008 Database to SQL 2005 ( How to Use SQL 2008 Database to SQL 2005 )


In some times we need to back up Database from Microsoft SQL server 2008 and restore it in Microsoft SQL server 2005 , But it is not possible to back up a higher version Database and restore in lower version with normal way

So that we have to try for an alternative method, here we use SQL script for this purpose

To use Database script method  to take Backup

Login in to your SQL 2008 with super user privilege >>>>>>

Right click the Database which you want to back up>>>  click “Tasks”

Click on ” Generate Script “

Click “ Next “

Select   “entire Database and all database objects” option

Click “Next”

In Output Type

Select “save script to a specific location ”

Select “Save file ” and “Unicode text”

And then Click on “ Advanced “

Change following fields

Script for server version = SQL server 2005

Types of Data to script = Schema and Data

Then Click “Ok”  >>>  Select destination location to save script

Click “Next” >>> Click “Next”

Click “Finish”

Restore Script in SQL Server 2005

Open the Script file in SQL Management studio

Change the .Mdf and .LDF location in the script before execute

    CREATE DATABASE [StockTraderDB] ON  PRIMARY

( NAME = N’StockTraderDB’,

FILENAME = N’c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\StockTraderDB.mdf ,

 SIZE = 4352KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )

 LOG ON

( NAME = N’StockTraderDB_log’,

FILENAME = N’c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\StockTraderDB_log.LDF’,

 SIZE = 6272KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)

 

Then Execute

Enjoy !!!!

Leave a comment

Filed under SQL

Unable to load client print control


Error:

Report Viewer Client Print Control “Unable to load client print control”

Possible cause

If your Report server or clients have recently updated with Cumulative security update for windows (KB956391) There is chances to have problem with Report server client print control

Symptoms:

Every time you press print icon on the report page the client try to enable one active x control it needs to download one cab file (RSClientPrint.cab) from the server after the security update it won’t work correctly and shows Error “Unable to load client print control”

Possible Solution:

After a lot of searching I have come out with a fix its works for me

Install the following security Update for Sql server on your Sql server machine

http://www.microsoft.com/downloads/details.aspx?FamilyID=4603c722-2468-4adb-b945-2ed0458b8f47&DisplayLang=en#filelist

http://www.microsoft.com/downloads/details.aspx?FamilyID=4603c722-2468-4adb-b945-2ed0458b8f47&DisplayLang=en#filelist

if you have  Sp3  go for this one

http://www.microsoft.com/downloads/details.aspx?familyid=0D878F4B-71E8-4170-9A14-1BCE684811CE&displaylang=en

Hope this will help

Leave a comment

Filed under SQL