September 15, 2009 at 1:07 am
I tried to change the path of the Model Database.
I used the below query to change it:
1. USE master;
GO
alter database model MODIFY FILE (NAME = modeldev,FILENAME='D:/FolderName');
go
alter database model MODIFY FILE (NAME = modellog,FILENAME='D:/FolderName');
go
2.Stop SQL Service.
I forgot to give the complete path i.e., i dint give the model.mdf in the filename to the above query.
So, when Im restarting the server, im unable to connect as it couldn't find the file in the given path.
Is there any way that i can fix this problem by giving the correct path for modeldb.??
Thanks for your help ..
September 15, 2009 at 1:28 am
September 15, 2009 at 1:32 am
Try to start sql server into minimal mode and then fix the issue.
Moveing Model database is very simple.
First of all stop sql server agent
Second, Detach and attach (after copying mdf and ldf to new location) model database.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
September 15, 2009 at 2:11 am
I've tried starting SQL Server with the options -m as well as with -f. But i got the error message couldn't find the path. The main problem which I've done here is I did not mention the name of the file i.e., I dint mention the path as 'D:\FolderName\model.mdf'. I jes mentioned it as 'D:\FolderName' . So is there any alternative to fix this problem. I even tried starting the sql server from sql command prompt i.e., sqlservr.exe -m -f. I even tried net start sqlserver /m /f . But everything is invain
September 15, 2009 at 2:17 am
http://support.microsoft.com/kb/224071
Let me know how you get on
http://www.sqlservercentral.com/Forums/Topic521288-146-1.aspx
--------------------------------------------------------------------------------------
[highlight]Recommended Articles on How to help us help you and[/highlight]
[highlight]solve commonly asked questions[/highlight]
Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
Managing Transaction Logs by Gail Shaw[/url]
How to post Performance problems by Gail Shaw[/url]
Help, my database is corrupt. Now what? by Gail Shaw[/url]
September 17, 2009 at 12:42 am
I could able to rebuild the system databases in SQL 2008 and later restored the databases with the back up taken earlier. I have rebuilt the databases using the below query at the below path. SQL 2008 is installed in the below path
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release:>
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME="MSSQLSERVER" /SQLSYSADMINACCOUNTS=Builtin\Administrators
In SQL 2008, we have a folder by name "Templates" which holds all the system database templates. When we execute the above command, SQL 2008 uses the databases present in Templates folder to rebuild the databases.
In SQL 2005, i tried rebuilding the system databases for the same problem. But I couldn't get it. Can you pls. help me for SQL 2005. I used the below command in SQL 2005.
C:>
start /wait \setup.exe /qb INSTANCENAME="MSSQLSERVER" REINSTALL=SQL_Engine REBUILDDATABASE=1
I copied the set up files into local drive and gave the path present of setup folder. The above command executes without errors. But i coudn't start the database as master db is not rebuilt with new system catalog values.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply