SQL Server won't start. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL Server won’t start.

Hello, [?]My MSSQLSERVER service won’t start anymore after I detach the model and msdb database (per KB224071). After adding the trace flag "-T3608", stopping and restarting MSSQLSERVER service. I detach the both model and msdb DB, move the files, removed trace flag, and tried to stop/restart MSSQLSERVER service. I get the following message when trying to start MSSQLSERVER service. "SQL Server does not exist or access denied. (ConnectionOpen (Connect()" I have tried to start SQL in single user mode, but I am getting the following error. "Could not find database ID 3. Database may not be activated yet or may be in transition." I even moved the msdb and model files back to orginal location, but no luck. Any help provide is appreciated.

Dou you have usefull databases, like production database?
Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
What is your goal? What are you trying to do? —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com
This is a development SQL box, however it is semi-important. I was just trying to move all the translog to another location from the default install location. Everything worked fine until I started to work on model and msdb.
Take help from thishttp://vyaskn.tripod.com/moving_sql_server.htm link to move the database which will take care of transaction logs as well. MODEL & MSDB are system databases and there is no problem to keep the system databases transaction log alongwith SQL Binaries directories, in general they tend to be small in size and do not contribute any performance issue. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Maybe this helps you: Use windows explorer to determine the exact path of all your system database files, and then apply the correct paths as follows: THE SYNTAX BELOW ASSUMES THE EXAMPLE THAT:
SQL Server program files are installed in the default folder:
"c:program FilesMicrosoft SQL ServerMSSQLBinn"
The ERRORLOG file is at "d:sqldataERRORLOG"
The master database file is at "d:sqldatamaster.mdf"
The master log file is at "d:sqldatamastlog.ldf"
The model database file at "D:Sqldatamodel.mdf"
The model log file at "D:Sqldatamodellog.ldf"
The msdb database file at "d:sqldatamsdb.mdf"
The msdb log file at "d:sqldatamsdb_log.ldf"
CHANGE THE SYNTAX AS NECESSARY TO MATCH THE FILENAME PATH OF YOUR DATABASE FILES Step 1:
——-
Start SQL Server from a command prompt with trace flag parameter.
You must include the parameters for the path of the master database files and Error Log:
c:program FilesMicrosoft SQL ServerMSSQLBinnsqlservr -T3608 -dd:sqldatamaster.mdf -ld:sqldatamastlog.ldf -ed:sqldataERRORLOG The Services will start even if the MSDB and Model databases are detached. Step 2:
——-
Connect to your server from Query Analyzer and run the following on the master database. EXEC sp_detach_db ‘model’, ‘true’
GO
EXEC sp_detach_db ‘msdb’, ‘true’
GO This will make sure that the MODEL and MSDB databases are detached from any incorrect files (if applicable).
If you receive an error that these databases do not exist, that’s OK. Go to Step 3. Step 3:
——-
Attach the correct model and msdb databases by pointing to the correct files on your server:
Run the following from Query Analyzer. EXEC sp_attach_db @dbname = N’model’, @filename1 = N’D:Sqldatamodel.mdf’, @filename2 = N’D:Sqldatamodellog.ldf’
GO EXEC sp_attach_db @dbname = N’msdb’, @filename1 = N’d:sqldatamsdb.mdf’, @filename2 = N’d:sqldatamsdb_log.ldf’
GO Step 4:
——- Close Query Analyzer. Stop the SQL services that are running in the command prompt (press Ctrl + C) Restart services as normal using Enterprise Manager or the Service Manager. ——————————————————————

Thank you to all. I was able to get MSSQLSERVER service started using David’s tip. c:program FilesMicrosoft SQL ServerMSSQLBinnsqlservr -T3608 -dd:sqldatamaster.mdf -ld:sqldatamastlog.ldf -ed:sqldataERRORLOG
]]>