Friday, March 23, 2012

Problem with sp_add_log_file_recover_suspect_db

Hi...
I have a database that is marked as suspect, because the log file couldnt
grow more due to physical disk size.
I cant free any space on that drive.
Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'Bitel mbH'.
I have tried putting the database name in [] as well, then i get
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME = 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
If i execute the alter database command directly i am told the some of the
files arent accesible.
I have a serious problem here, how do i solve it.
I have looked at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_4rol.asp
But none of the approaches seems open to me. The log is 145 GB, and i dont
have that amount of free space anywhere else on the system.
Can i do a detach and reconnect with a new number of logs or what can i do.
I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
is because the name contains spaces, can i rename it, add a log, and rename
it back? (i unfortunately need the name to remain the same)
Regards
JesperHi
Doe either of the follwing work?
sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:
> Hi...
> I have a database that is marked as suspect, because the log file couldnt
> grow more due to physical disk size.
> I cant free any space on that drive.
> Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
> following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
> 'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
> I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
> Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'Bitel mbH'.
> I have tried putting the database name in [] as well, then i get
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME => 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
> If i execute the alter database command directly i am told the some of the
> files arent accesible.
> I have a serious problem here, how do i solve it.
> I have looked at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_4rol.asp
> But none of the approaches seems open to me. The log is 145 GB, and i dont
> have that amount of free space anywhere else on the system.
> Can i do a detach and reconnect with a new number of logs or what can i do.
> I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
> is because the name contains spaces, can i rename it, add a log, and rename
> it back? (i unfortunately need the name to remain the same)
> Regards
> Jesper
>
>|||Hi...
> Doe either of the follwing work?
> sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
> sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
Unfortunately not, both yields the same result:
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME ='D:\log2.ldf', SIZE = 10000MB )
As you can see in the result the command is not formatted correctly, which
also is why in the original post i had tried to run it directly (with the
result that it complained that some files werent accesible).
Any ideas?
Regards
Jesper (jln@.telebillingREMOVE.dk for direct mail)|||Hi
Looks liek one of those system SP's that does not support object names that
does not conform to naming conventions.
I would open a call with Microsoft Product Support Services in your country.
They may be able to help.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:
> Hi...
> > Doe either of the follwing work?
> > sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> > 'D:\SQLLogEx\log2.ldf', '10000MB'
> > sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> > 'D:\SQLLogEx\log2.ldf', '10000MB'
> Unfortunately not, both yields the same result:
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME => 'D:\log2.ldf', SIZE = 10000MB )
> As you can see in the result the command is not formatted correctly, which
> also is why in the original post i had tried to run it directly (with the
> result that it complained that some files werent accesible).
> Any ideas?
> Regards
> Jesper (jln@.telebillingREMOVE.dk for direct mail)
>
>sql

No comments:

Post a Comment