Saturday, March 12, 2011

Sample Letters For Community Service Hours

How to connect to a SQL Server that is completely blocked

Sometimes you can not connect to SQL Server because we do not have the administrator password, you can not connect to the instance, or have removed all members of the groups that were allowed to connect to SQL Server. In order to access the SQL Server will again to make an administrative connection to SQL Server, to do this we must perform the following steps:

1. First you have to stop all SQL Server services, that is to start the SQL Server in administrative mode, to stop the services running the following commands:

net stop MSSQLSERVER net stop

SQLSERVERAGENT

net stop MSSQLServerOLAPService

SQLBrowser net stop net stop

MsDtsServer100

net stop ReportServer

2. Now we must find the directory where you installed SQL Server to start SQL ; administrative mode from the Command Prompt, this route depends on the version of SQL Server, but it could be the next to SQL 2008 R2 C: \\ Program Files \\ Microsoft SQL Server \\ MSSQL10_50.MSSQLSERVER \\ MSSQL \\ Binn, there must run from the command prompt the following command

sqlservr.exe-m If

you have is a named instance of SQL Server, then you should run the following command

sqlservr.exe-m-s \u0026lt;instanceName>

3. Now SQL Server is running in Single User Mode to access the service should open another Command Prompt and run the following command

sqlcmd-E ;

4. After we are connected to SQL Server, run the following command to create a new login in SQL Server. The following command adds the local administrator rights sysadmin, you can add to the group they wish.

create login [BUILTIN \\ Administrators] from windows go exec
sp_addsrvrolemember [BUILTIN \\ Administrators], [sysadmin]
go

5. After you modify the security lowers the SQL Server service shutdown go 6. Now that SQL Server out of Single User Mode, we can start again Servernet SQL services start MSSQLSERVER net start

SQLSERVERAGENT

MSSQLServerOLAPService net start net start

SQLBrowser

MsDtsServer100 net start net start

ReportServer

6. Now you can connect to SQL Server with a user who belongs to local Administrators group.


Greetings,

Mr. Eduardo Castro Martínez, PhD - Microsoft SQL Server MVP

http://tiny.cc/comwindows

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/

0 comments:

Post a Comment