RSS

SQL Server 2008R2 Error After intall Then Make Update To Your PC

25 Sep

SQL Server 2008R2 Error After intall Then Make Update To Your PC

 

Introduction

 
Yesterday I install SQL  server 2008R2 in my Laptop  Then After install I make update to my pc in this update I download update for SQL Server 2008R2
This Update  Name  is

(Security Update for SQL Server 2008 R2 (KB2494088))
Then after I intall the update I make restart to my laptop then I try to connect to my instance SQL server 2008R2 I receive this Error massage

Login failed for user ‘Elmasry-PC\Elmasry’. Reason: Server is in script upgrade mode (Only administrator can connect at this time. (Microsoft SQL Server, Error: 18401)) .


 When I see this error I can’t believe my easy  Because before 5 minutes before the update my instance was worked very good so I make search on the internet  and I can fix this error

 
The Solution

 
1. Enable trace flag 902 on the instance of SQL Server 2008 R2. To do this, follow these steps:
a. Open SQL Server Configuration Manager.
b. In SQL Server Configuration Manager, click SQL Server Services.
c. Double-click the SQL Server service.
d. In the SQL Server Properties dialog box, click the Advanced tab.
e. On click the Advanced tab, locate the Startup Parameters item.
f. Add(( ;-T902 )) to the end of the existing string value, and then click OK.
2. Right-click the SQL Server service, and then click Start.
3. If the SQL Server Agent service is running, right-click the SQL Server Agent service, and then click Stop.
4. Open SQL Server Management Studio, and then connect to the instance of SQL Server 2008 R2.
5. Run the following statements:

EXEC sp_configure ‘show advanced’, 1;
RECONFIGURE;
EXEC sp_configure ‘allow updates’, 0;
RECONFIGURE;
EXEC sp_configure ‘Agent XPs’, 1;
RECONFIGURE;
GO

Note  :

In steps No 5 I receive another Error massage this Massage is ((ad hoc update to system catalogs is not supported)) So if you Receive this error try to make this step (Fix Ad Hoc) If you don’t receive this error go to step no 6

 
Fix Ad Hoc
Run This Script then Try to make the step No 5 Again
sp_configure ‘show advanced options’,1
reconfigure
go
sp_configure ‘xp_cmdshell’,1
reconfigure
go
sp_configure ‘show advanced options’,1
reconfigure with override
go
sp_configure ‘xp_cmdshell’,1
reconfigure with override
go

—Reset the “allow updates” setting to the recommended 0
sp_configure ‘allow updates’,0
reconfigure with override
go
—Reset the environment back as the test is complete
sp_configure ‘xp_cmdshell’,0
reconfigure
go
sp_configure ‘show advanced options’,0
reconfigure
go

6. In SQL Server Configuration Manager, right-click the SQL Server service, and then click Stop.
7. Remove trace flag 902 on the instance of SQL Server 2008 R2. To do this, delete((  ;-T902 )) from the string value that you updated in step 1f.
8. Right-click the SQL Server service, and then click Start.
9. Right-click the SQL Server Agent service, and then click Start.
10. In SQL Server Management Studio, reconnect to the instance of SQL Server 2008 R2.
11. In Object Explorer, expand Management, right-click Data Collection, and then click Enable Data Collection.
Note :

 You may receive the following error message when you connect to the instance of SQL Server 2008 R2 in SQL Server Management Studio:
Error: 18401
Login failed for user ‘<login name>’. Reason: Server is in script upgrade mode. Only administrator can connect at this time.


This error message indicates that SQL Server 2008 R2 is completing the installation of cumulative update package 1. If you receive this error message, wait several minutes and then connect to the instance of SQL Server 2008 R2 again.
 Best Regards

Mostafa Elmasry

 
Leave a comment

Posted by on September 25, 2011 in Errors

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s