Hi,
I have a database that use two log files. I deleted one of the logs going to
database/properties/files select the log file, and remove.
Everything goes well, but now when I go to database/properties/files I still
see the tow log files (the folder and file for one of the logs doesnâ't exist
anymore).
Any idea how to resolve this?
ThanksHi
You don't say which version of SQL Server you are using? Have you tried
sp_helpfile to see what that gives and the
ALTER DATABASE REMOVE FILE logical_file_name
command to see if it can be removed that way?
John
"Tecnica" wrote:
> Hi,
> I have a database that use two log files. I deleted one of the logs going to
> database/properties/files select the log file, and remove.
> Everything goes well, but now when I go to database/properties/files I still
> see the tow log files (the folder and file for one of the logs doesnâ't exist
> anymore).
> Any idea how to resolve this?
> Thanks
>|||Hi John,
in fact i didn´t mencioned that the SQL is version 2005.
The ALTER DATABASE REMOVE FILE logical_file_name doesn´t work because
phisicaly the file does not exist.
If you run SELECT * FROM sys.database_files you see the file mencioned in
one row, but i don´t know if i can modify this system table.
Rui
"John Bell" wrote:
> Hi
> You don't say which version of SQL Server you are using? Have you tried
> sp_helpfile to see what that gives and the
> ALTER DATABASE REMOVE FILE logical_file_name
> command to see if it can be removed that way?
> John
>
> "Tecnica" wrote:
> > Hi,
> > I have a database that use two log files. I deleted one of the logs going to
> > database/properties/files select the log file, and remove.
> > Everything goes well, but now when I go to database/properties/files I still
> > see the tow log files (the folder and file for one of the logs doesnâ't exist
> > anymore).
> > Any idea how to resolve this?
> >
> > Thanks
> >|||Hi
You should not need to modify system catalogs. Do you have the number/text
for the error for the ALTER DATABASE command. Are you using SP1?
John
"Tecnica" wrote:
> Hi John,
> in fact i didn´t mencioned that the SQL is version 2005.
> The ALTER DATABASE REMOVE FILE logical_file_name doesn´t work because
> phisicaly the file does not exist.
> If you run SELECT * FROM sys.database_files you see the file mencioned in
> one row, but i don´t know if i can modify this system table.
> Rui
> "John Bell" wrote:
> > Hi
> >
> > You don't say which version of SQL Server you are using? Have you tried
> > sp_helpfile to see what that gives and the
> > ALTER DATABASE REMOVE FILE logical_file_name
> > command to see if it can be removed that way?
> >
> > John
> >
> >
> > "Tecnica" wrote:
> >
> > > Hi,
> > > I have a database that use two log files. I deleted one of the logs going to
> > > database/properties/files select the log file, and remove.
> > > Everything goes well, but now when I go to database/properties/files I still
> > > see the tow log files (the folder and file for one of the logs doesnâ't exist
> > > anymore).
> > > Any idea how to resolve this?
> > >
> > > Thanks
> > >|||Hi,
My understanding of your issue is that:
Your database had two log files. You manually deleted one of the log files
in SQL Server Management Studio. However when you viewed the database
properties again, you found that the log file was still there.
If I have misunderstood, please let me know.
I performed a test in SQL Server 2005 Enterprise Edition SP1, but
unfortunately I couldn't reproduce your issue. Everything works fine at my
side. I created a database called TMLogDB which has two log files:
TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
manually removed the TMLogDB_log1. Then I clicked the Properties of the
database and found that the log file had been removed.
For further research, I recommend that:
1. Check if this issue occurs only on this database. Please create a test
dabase and see if the same issue exists on it;
2. Completely backup your database, then try using sp_detach_db to detach
the database and sp_attach_db to attach the database with the current log
file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
Server Books Online.
3. Install SQL Server 2005 SP1 if it was not installed on your computer.
4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi Charles
tanks for the help. Detach and attach database has solve the problem.
Regards,
Rui Reis
"Charles Wang[MSFT]" wrote:
> Hi,
> My understanding of your issue is that:
> Your database had two log files. You manually deleted one of the log files
> in SQL Server Management Studio. However when you viewed the database
> properties again, you found that the log file was still there.
> If I have misunderstood, please let me know.
> I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> unfortunately I couldn't reproduce your issue. Everything works fine at my
> side. I created a database called TMLogDB which has two log files:
> TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> manually removed the TMLogDB_log1. Then I clicked the Properties of the
> database and found that the log file had been removed.
> For further research, I recommend that:
> 1. Check if this issue occurs only on this database. Please create a test
> dabase and see if the same issue exists on it;
> 2. Completely backup your database, then try using sp_detach_db to detach
> the database and sp_attach_db to attach the database with the current log
> file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> Server Books Online.
> 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> If you have any other questions or concerns, please feel free to let me
> know. It's my pleasure to be of assistance.
> Sincerely yours,
> Charles Wang
> Microsoft Online Community Support
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>
>|||Hi,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi
Can you let us know whether this is SP1 or not?
Thanks
John
"Tecnica" wrote:
> Hi Charles
> tanks for the help. Detach and attach database has solve the problem.
> Regards,
> Rui Reis
> "Charles Wang[MSFT]" wrote:
> > Hi,
> > My understanding of your issue is that:
> > Your database had two log files. You manually deleted one of the log files
> > in SQL Server Management Studio. However when you viewed the database
> > properties again, you found that the log file was still there.
> > If I have misunderstood, please let me know.
> >
> > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > side. I created a database called TMLogDB which has two log files:
> > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > database and found that the log file had been removed.
> >
> > For further research, I recommend that:
> > 1. Check if this issue occurs only on this database. Please create a test
> > dabase and see if the same issue exists on it;
> > 2. Completely backup your database, then try using sp_detach_db to detach
> > the database and sp_attach_db to attach the database with the current log
> > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > Server Books Online.
> > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> >
> > If you have any other questions or concerns, please feel free to let me
> > know. It's my pleasure to be of assistance.
> >
> > Sincerely yours,
> > Charles Wang
> > Microsoft Online Community Support
> >
> > ======================================================> > When responding to posts, please "Reply to Group" via
> > your newsreader so that others may learn and benefit
> > from this issue.
> > ======================================================> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > ======================================================> >
> >
> >
> >|||Hi
no, it is not SP1 because i already intaled some time ago. It was detach and
atach that solve the problem.
Thanks again,
Rui Reis
"John Bell" wrote:
> Hi
> Can you let us know whether this is SP1 or not?
> Thanks
> John
> "Tecnica" wrote:
> > Hi Charles
> >
> > tanks for the help. Detach and attach database has solve the problem.
> >
> > Regards,
> > Rui Reis
> >
> > "Charles Wang[MSFT]" wrote:
> >
> > > Hi,
> > > My understanding of your issue is that:
> > > Your database had two log files. You manually deleted one of the log files
> > > in SQL Server Management Studio. However when you viewed the database
> > > properties again, you found that the log file was still there.
> > > If I have misunderstood, please let me know.
> > >
> > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > side. I created a database called TMLogDB which has two log files:
> > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > database and found that the log file had been removed.
> > >
> > > For further research, I recommend that:
> > > 1. Check if this issue occurs only on this database. Please create a test
> > > dabase and see if the same issue exists on it;
> > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > the database and sp_attach_db to attach the database with the current log
> > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > Server Books Online.
> > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > >
> > > If you have any other questions or concerns, please feel free to let me
> > > know. It's my pleasure to be of assistance.
> > >
> > > Sincerely yours,
> > > Charles Wang
> > > Microsoft Online Community Support
> > >
> > > ======================================================> > > When responding to posts, please "Reply to Group" via
> > > your newsreader so that others may learn and benefit
> > > from this issue.
> > > ======================================================> > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > ======================================================> > >
> > >
> > >
> > >|||Hi
I would strongly recommend that you upgrade to SP1 which does not seem to
have this issue.
John
"Tecnica" wrote:
> Hi
> no, it is not SP1 because i already intaled some time ago. It was detach and
> atach that solve the problem.
> Thanks again,
> Rui Reis
> "John Bell" wrote:
> > Hi
> >
> > Can you let us know whether this is SP1 or not?
> >
> > Thanks
> >
> > John
> >
> > "Tecnica" wrote:
> >
> > > Hi Charles
> > >
> > > tanks for the help. Detach and attach database has solve the problem.
> > >
> > > Regards,
> > > Rui Reis
> > >
> > > "Charles Wang[MSFT]" wrote:
> > >
> > > > Hi,
> > > > My understanding of your issue is that:
> > > > Your database had two log files. You manually deleted one of the log files
> > > > in SQL Server Management Studio. However when you viewed the database
> > > > properties again, you found that the log file was still there.
> > > > If I have misunderstood, please let me know.
> > > >
> > > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > > side. I created a database called TMLogDB which has two log files:
> > > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > > database and found that the log file had been removed.
> > > >
> > > > For further research, I recommend that:
> > > > 1. Check if this issue occurs only on this database. Please create a test
> > > > dabase and see if the same issue exists on it;
> > > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > > the database and sp_attach_db to attach the database with the current log
> > > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > > Server Books Online.
> > > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > > >
> > > > If you have any other questions or concerns, please feel free to let me
> > > > know. It's my pleasure to be of assistance.
> > > >
> > > > Sincerely yours,
> > > > Charles Wang
> > > > Microsoft Online Community Support
> > > >
> > > > ======================================================> > > > When responding to posts, please "Reply to Group" via
> > > > your newsreader so that others may learn and benefit
> > > > from this issue.
> > > > ======================================================> > > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > > ======================================================> > > >
> > > >
> > > >
> > > >|||Hi
I didnâ't explain well. I have already upgrade to SP1 some time ago (I donâ't
remember when).
Thanks
"John Bell" wrote:
> Hi
> I would strongly recommend that you upgrade to SP1 which does not seem to
> have this issue.
> John
> "Tecnica" wrote:
> > Hi
> >
> > no, it is not SP1 because i already intaled some time ago. It was detach and
> > atach that solve the problem.
> >
> > Thanks again,
> > Rui Reis
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Can you let us know whether this is SP1 or not?
> > >
> > > Thanks
> > >
> > > John
> > >
> > > "Tecnica" wrote:
> > >
> > > > Hi Charles
> > > >
> > > > tanks for the help. Detach and attach database has solve the problem.
> > > >
> > > > Regards,
> > > > Rui Reis
> > > >
> > > > "Charles Wang[MSFT]" wrote:
> > > >
> > > > > Hi,
> > > > > My understanding of your issue is that:
> > > > > Your database had two log files. You manually deleted one of the log files
> > > > > in SQL Server Management Studio. However when you viewed the database
> > > > > properties again, you found that the log file was still there.
> > > > > If I have misunderstood, please let me know.
> > > > >
> > > > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > > > side. I created a database called TMLogDB which has two log files:
> > > > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > > > database and found that the log file had been removed.
> > > > >
> > > > > For further research, I recommend that:
> > > > > 1. Check if this issue occurs only on this database. Please create a test
> > > > > dabase and see if the same issue exists on it;
> > > > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > > > the database and sp_attach_db to attach the database with the current log
> > > > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > > > Server Books Online.
> > > > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > > > >
> > > > > If you have any other questions or concerns, please feel free to let me
> > > > > know. It's my pleasure to be of assistance.
> > > > >
> > > > > Sincerely yours,
> > > > > Charles Wang
> > > > > Microsoft Online Community Support
> > > > >
> > > > > ======================================================> > > > > When responding to posts, please "Reply to Group" via
> > > > > your newsreader so that others may learn and benefit
> > > > > from this issue.
> > > > > ======================================================> > > > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > > > ======================================================> > > > >
> > > > >
> > > > >
> > > > >
No comments:
Post a Comment