Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Error while restoring model database backup.

Author  Topic 

Martyn123
Starting Member

29 Posts

Posted - 2011-01-28 : 02:04:07
Hi,

SUB:Restoring model database from backup.

I am facing this problem while restoring model database backup.I have master and msdb database
intact and I want to restore model database from backup.

I have tried to use the following trace flags but to no avail and I keep getting the following
errors:

I have read on the blog that Trace flag 3609 is used if there are some problems in model database.
and Trace flag 3104 to bypass checking for free space.

Even if I only use trace flag 3608 I am getting the same errors.

but I am getting free space error as well even though I have free space in GBs(26 GB free space)

I am executing the below code from command prompt:

C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn>SQLSERVR
.EXE -T3608;-T3609;-T3104


This is an informational message only; no user action is required.
2011-01-28 12:01:11.42 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\D
ATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\L
og\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\D
ATA\mastlog.ldf
2011-01-28 12:01:11.42 Server Command Line Startup Parameters:
-T 3608;-T3609;-T3104
2011-01-28 12:01:11.47 Server SQL Server is starting at normal priority bas
e (=7). This is an informational message only. No user action is required.

2011-01-28 12:01:11.63 spid7s Recovering only master database because trace
flag 3608 was specified. This is an informational message only. No user action i
s required.
2011-01-28 12:01:11.64 spid7s Starting up database 'master'.
2011-01-28 12:01:11.73 spid7s Snapshot isolation or read committed snapshot
is not available in database 'master' because SQL Server was started with one o
r more undocumented trace flags that prevent enabling database for versioning. T
ransaction started with snapshot isolation will fail and a query running under r
ead committed snapshot will succeed but will resort back to lock based read comm
itted.
2011-01-28 12:01:11.95 spid7s Resource governor reconfiguration succeeded.
2011-01-28 12:01:11.98 spid7s SQL Server Audit is starting the audits. This
is an informational message. No user action is required.
2011-01-28 12:01:11.99 spid7s SQL Server Audit has started the audits. This
is an informational message. No user action is required.
2011-01-28 12:01:12.06 spid7s FILESTREAM: effective level = 0, configured l
evel = 0, file system access share name = 'MSSQLSERVER'.
2011-01-28 12:01:12.14 spid7s SQL Trace ID 1 was started by login "sa".
2011-01-28 12:01:12.40 Server A self-generated certificate was successfully
loaded for encryption.
2011-01-28 12:01:12.42 Server Server is listening on [ 'any' <ipv6> 1433].
2011-01-28 12:01:12.42 spid7s Server name is 'VM0409-555'. This is an in
formational message only. No user action is required.
2011-01-28 12:01:12.42 Server Server is listening on [ 'any' <ipv4> 1433].
2011-01-28 12:01:12.42 Server Server local connection provider is ready to
accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2011-01-28 12:01:12.42 Server Server named pipe provider is ready to accept
connection on [ \\.\pipe\sql\query ].
2011-01-28 12:01:12.44 Server Server is listening on [ ::1 <ipv6> 1434].
2011-01-28 12:01:12.44 spid7s Recovery is complete. This is an informationa
l message only. No user action is required.
2011-01-28 12:01:12.44 Server Server is listening on [ 127.0.0.1 <ipv4> 143
4].
2011-01-28 12:01:12.44 Server Dedicated admin connection support was establ
ished for listening locally on port 1434.
2011-01-28 12:01:12.51 Server The SQL Server Network Interface library succ
essfully registered the Service Principal Name (SPN) [ MSSQLSvc/VM0409-555.test.com ]
for the SQL Server service.
2011-01-28 12:01:12.51 Server The SQL Server Network Interface library succ
essfully registered the Service Principal Name (SPN) [ MSSQLSvc/VM0409-555.test.com:1433 ]
for the SQL Server service.
2011-01-28 12:01:12.51 Server SQL Server is now ready for client connection
s. This is an informational message; no user action is required.
2011-01-28 12:02:04.33 spid51 Clearing tempdb database.
2011-01-28 12:02:04.38 spid51 Starting up database 'model'.
2011-01-28 12:02:04.39 spid51 Error: 17204, Severity: 16, State: 1.
2011-01-28 12:02:04.39 spid51 FCB::Open failed: Could not open file C:\Prog
ram Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\model.mdf for f
ile number 1. OS error: 2(The system cannot find the file specified.).
2011-01-28 12:02:04.39 spid51 Error: 17207, Severity: 16, State: 1.
2011-01-28 12:02:04.39 spid51 FileMgr::StartLogFiles: Operating system erro
r 2(The system cannot find the file specified.) occurred while creating or openi
ng file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
\modellog.ldf'. Diagnose and correct the operating system error, and retry the o
peration.
2011-01-28 12:02:04.39 spid51 Could not create tempdb. You may not have eno
ugh disk space available. Free additional disk space by deleting other files on
the tempdb drive and then restart SQL Server. Check for additional errors in the
event log that may indicate why the tempdb files could not be initialized.
2011-01-28 12:02:04.40 spid51 SQL Trace was stopped due to server shutdown.
Trace ID = '1'. This is an informational message only; no user action is requir
ed.
2011-01-28 12:02:04.57 Server The SQL Server Network Interface library succ
essfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/VM0409-555.
test.com ] for the SQL Server service.
2011-01-28 12:02:04.58 Server The SQL Server Network Interface library succ
essfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/VM0409-555.
test.com:1433 ] for the SQL Server service.

I am executing the below code on SQLCMD

C:\Users\administrator>SQLCMD
1> RESTORE DATABASE model FROM DISK='C:\model.bak' WITH REPLACE
2> GO
HResult 0x6D, Level 16, State 1
Shared Memory Provider: The pipe has been ended.

Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Communication link fail
ure.


Please help me out in resolving this issue.


Thanks

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-01-28 : 07:48:42
Based on this post, and this one

If I was you, I'd rebuild the box and then restore your user databases, unless they are very large.

Why were you trying to rebuild msdb in the 1st place?
Go to Top of Page
   

- Advertisement -