Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SQL Server 2000 master6.ldf question

 
   Database Help (Home) -> Programming RSS
Next:  Calculating a SUM and Percentage  
Author Message
jasonhuang88881

External


Since: Dec 28, 2004
Posts: 23



(Msg. 1) Posted: Thu May 15, 2008 2:29 pm
Post subject: SQL Server 2000 master6.ldf question
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hi,

In my SQL Server 2000, I have a master6.ldf. It's size is huge, and it's
also growing.
I am wondering why it is master6.ldf and not master.ldf.
Since it's growing, I am wondering how to make it smaller.
Thanks for help.


Jason

 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Paddy

External


Since: Jan 23, 2008
Posts: 63



(Msg. 2) Posted: Thu May 15, 2008 2:29 pm
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Double check that Master6.ldf belongs to Master by running the
following.


exec sp_helpdb 'master'

If it does

Backup Master
Backup Master Transaction Log

You can then shrink the master6 transaction log file. It is problaly
as easy to do this by using enterprise manager (Right click the
database)

Read up on backups and transaction logs, as you need to schedule these
operations with a maintenance plan.

Maybe the master databases is being used for stuff it shouldn't be as
well, do you create tables etc.. in it that should be in user
databases?

Paddy

 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
John Bell

External


Since: Jun 01, 2004
Posts: 652



(Msg. 3) Posted: Thu May 15, 2008 2:29 pm
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Jason Huang" wrote in message

> Hi,
>
> In my SQL Server 2000, I have a master6.ldf. It's size is huge, and it's
> also growing.
> I am wondering why it is master6.ldf and not master.ldf.
> Since it's growing, I am wondering how to make it smaller.
> Thanks for help.
>
>
> Jason
Hi

I suspect that the file is not part of the master data unless you are using
it instead of a user database which is never a good idea!

The following query in SQL 2005 will give you the name of the database the
file is associated with:

SELECT db_name(database_id),
name,
CASE TYPE WHEN 0 THEN 'Data' WHEN 1 THEN 'Log' ELSE 'Unknown' END AS
[Type],
file_id,
physical_name
FROM sys.master_files
WHERE physical_name like '%master6%'

for SQL 2000 try:

SELECT db_name(dbid),
name,
fileid,
filename
FROM sysaltfiles
WHERE filename like '%master6%'

John
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Tibor Karaszi

External


Since: Jan 29, 2004
Posts: 1559



(Msg. 4) Posted: Thu May 15, 2008 2:29 pm
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> Double check that Master6.ldf belongs to Master
<snip>

I doubt it does. I don't think you can add database files to the master database. And also, master
is *effectively* stuck in simple recovery model. So my guess is that this ldf file belong to some
other database (and is badly named). And I fully agree with the rest. Determine what database it
belong and take it from there.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Paddy" wrote in message

> Double check that Master6.ldf belongs to Master by running the
> following.
>
>
> exec sp_helpdb 'master'
>
> If it does
>
> Backup Master
> Backup Master Transaction Log
>
> You can then shrink the master6 transaction log file. It is problaly
> as easy to do this by using enterprise manager (Right click the
> database)
>
> Read up on backups and transaction logs, as you need to schedule these
> operations with a maintenance plan.
>
> Maybe the master databases is being used for stuff it shouldn't be as
> well, do you create tables etc.. in it that should be in user
> databases?
>
> Paddy
>
>
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Paddy

External


Since: Jan 23, 2008
Posts: 63



(Msg. 5) Posted: Mon May 19, 2008 12:59 am
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 19 May, 03:50, "Jason Huang" wrote:
> Thank you guys so much!
> After I executed the SELECT db_name(dbid) ...FROM sysaltfiles command,
> found the master6.ldf file is a log file of a database dbAP65Bak,
> and that database is orginally transferred from a  SQL 6.5 database server.
> But I have no idea why that log file keeps growing everyday, since that
> database is just for backup purpose,
> and we just once in a while (e.g., every 6 months) dump some data from the
> dbAP65.
>
> "John Bell"
> ???????:D768DF0D-425E-4B87-BBBA-5D6DFD904...@microsoft.com...
>
>
>
>
>
> > "Jason Huang" wrote in message
> >
> >> Hi,
>
> >> In my SQL Server 2000, I have a master6.ldf.  It's size is huge, and it's
> >> also growing.
> >> I am wondering why it is master6.ldf and not master.ldf.
> >> Since it's growing, I am wondering how to make it smaller.
> >> Thanks for help.
>
> >> Jason
> > Hi
>
> > I suspect that the file is not part of the master data unless you are
> > using it instead of a user database which is never a good idea!
>
> > The following query in SQL 2005 will give you the name of the database the
> > file is associated with:
>
> > SELECT db_name(database_id),
> >  name,
> >  CASE TYPE WHEN 0 THEN 'Data' WHEN 1 THEN 'Log' ELSE 'Unknown' END AS
> > [Type],
> >  file_id,
> >  physical_name
> > FROM sys.master_files
> > WHERE physical_name like '%master6%'
>
> > for SQL 2000 try:
>
> > SELECT db_name(dbid),
> >  name,
> >  fileid,
> >  filename
> > FROM sysaltfiles
> > WHERE filename like '%master6%'
>
> > John- Hide quoted text -
>
> - Show quoted text -

Jason

if that is the case you can change the database to change the recovery
mode to simple. You sound like you don't need transaction logs anyway.

Lookup recovery mode in BOL though.

Paddy
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Paddy

External


Since: Jan 23, 2008
Posts: 63



(Msg. 6) Posted: Mon May 19, 2008 3:29 am
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is not an easy thing to delete, as it is required by the DB
regardless of your recovery mode.

You could certainly backup the DB, delete the whole thing and then
restore to a more apt name.

Paddy
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
jasonhuang88881

External


Since: Dec 28, 2004
Posts: 23



(Msg. 7) Posted: Mon May 19, 2008 10:50 am
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you guys so much!
After I executed the SELECT db_name(dbid) ...FROM sysaltfiles command,
found the master6.ldf file is a log file of a database dbAP65Bak,
and that database is orginally transferred from a SQL 6.5 database server.
But I have no idea why that log file keeps growing everyday, since that
database is just for backup purpose,
and we just once in a while (e.g., every 6 months) dump some data from the
dbAP65.



"John Bell"
???????:D768DF0D-425E-4B87-BBBA-5D6DFD904B03@microsoft.com...
>
> "Jason Huang" wrote in message
>
>> Hi,
>>
>> In my SQL Server 2000, I have a master6.ldf. It's size is huge, and it's
>> also growing.
>> I am wondering why it is master6.ldf and not master.ldf.
>> Since it's growing, I am wondering how to make it smaller.
>> Thanks for help.
>>
>>
>> Jason
> Hi
>
> I suspect that the file is not part of the master data unless you are
> using it instead of a user database which is never a good idea!
>
> The following query in SQL 2005 will give you the name of the database the
> file is associated with:
>
> SELECT db_name(database_id),
> name,
> CASE TYPE WHEN 0 THEN 'Data' WHEN 1 THEN 'Log' ELSE 'Unknown' END AS
> [Type],
> file_id,
> physical_name
> FROM sys.master_files
> WHERE physical_name like '%master6%'
>
> for SQL 2000 try:
>
> SELECT db_name(dbid),
> name,
> fileid,
> filename
> FROM sysaltfiles
> WHERE filename like '%master6%'
>
> John
>
>
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
John Bell

External


Since: Jun 01, 2004
Posts: 652



(Msg. 8) Posted: Mon May 19, 2008 10:50 am
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Jason Huang" wrote in message

> Thank you guys so much!
> After I executed the SELECT db_name(dbid) ...FROM sysaltfiles command,
> found the master6.ldf file is a log file of a database dbAP65Bak,
> and that database is orginally transferred from a SQL 6.5 database
> server.
> But I have no idea why that log file keeps growing everyday, since that
> database is just for backup purpose,
> and we just once in a while (e.g., every 6 months) dump some data from the
> dbAP65.
>
>
>
Hi

You may want to see if there are any transactions that have not been
committed using

DBCC OPENTRAN ( 'dbAP65Bak' )

If the recovery mode is full then you would need to do log backups or you
can change the recovery mode to simple as Paddy suggests

John
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
jasonhuang88881

External


Since: Dec 28, 2004
Posts: 23



(Msg. 9) Posted: Mon May 19, 2008 6:03 pm
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can I delete it anyway?
What would be the side affect?

"Paddy"
???????:2929c312-e683-4ad2-ba6f-857ba15058ea@s50g2000hsb.googlegroups.com...
On 19 May, 03:50, "Jason Huang" wrote:
> Thank you guys so much!
> After I executed the SELECT db_name(dbid) ...FROM sysaltfiles command,
> found the master6.ldf file is a log file of a database dbAP65Bak,
> and that database is orginally transferred from a SQL 6.5 database server.
> But I have no idea why that log file keeps growing everyday, since that
> database is just for backup purpose,
> and we just once in a while (e.g., every 6 months) dump some data from the
> dbAP65.
>
> "John Bell"
> ???????:D768DF0D-425E-4B87-BBBA-5D6DFD904...@microsoft.com...
>
>
>
>
>
> > "Jason Huang" wrote in message
> >
> >> Hi,
>
> >> In my SQL Server 2000, I have a master6.ldf. It's size is huge, and
> >> it's
> >> also growing.
> >> I am wondering why it is master6.ldf and not master.ldf.
> >> Since it's growing, I am wondering how to make it smaller.
> >> Thanks for help.
>
> >> Jason
> > Hi
>
> > I suspect that the file is not part of the master data unless you are
> > using it instead of a user database which is never a good idea!
>
> > The following query in SQL 2005 will give you the name of the database
> > the
> > file is associated with:
>
> > SELECT db_name(database_id),
> > name,
> > CASE TYPE WHEN 0 THEN 'Data' WHEN 1 THEN 'Log' ELSE 'Unknown' END AS
> > [Type],
> > file_id,
> > physical_name
> > FROM sys.master_files
> > WHERE physical_name like '%master6%'
>
> > for SQL 2000 try:
>
> > SELECT db_name(dbid),
> > name,
> > fileid,
> > filename
> > FROM sysaltfiles
> > WHERE filename like '%master6%'
>
> > John- Hide quoted text -
>
> - Show quoted text -

Jason

if that is the case you can change the database to change the recovery
mode to simple. You sound like you don't need transaction logs anyway.

Lookup recovery mode in BOL though.

Paddy
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Tibor Karaszi

External


Since: Jan 29, 2004
Posts: 1559



(Msg. 10) Posted: Mon May 19, 2008 6:03 pm
Post subject: Re: SQL Server 2000 master6.ldf question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> Can I delete it anyway?

Delete what? Never ever delete any of the database files for a database.
First, make sure you understand backup and restore, recovery model etc. See for instance
http://msdn.microsoft.com/en-us/library/ms345583.aspx

Now, if you have an exceptionally large log file, you might consider to after determining recovery
model and backup type to do a one-time shrink of the file. I have some details about file shrinking
in:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Jason Huang" wrote in message

> Can I delete it anyway?
> What would be the side affect?
>
> "Paddy"
> ???????:2929c312-e683-4ad2-ba6f-857ba15058ea@s50g2000hsb.googlegroups.com...
> On 19 May, 03:50, "Jason Huang" wrote:
>> Thank you guys so much!
>> After I executed the SELECT db_name(dbid) ...FROM sysaltfiles command,
>> found the master6.ldf file is a log file of a database dbAP65Bak,
>> and that database is orginally transferred from a SQL 6.5 database server.
>> But I have no idea why that log file keeps growing everyday, since that
>> database is just for backup purpose,
>> and we just once in a while (e.g., every 6 months) dump some data from the
>> dbAP65.
>>
>> "John Bell"
>> ???????:D768DF0D-425E-4B87-BBBA-5D6DFD904...@microsoft.com...
>>
>>
>>
>>
>>
>> > "Jason Huang" wrote in message
>> >
>> >> Hi,
>>
>> >> In my SQL Server 2000, I have a master6.ldf. It's size is huge, and it's
>> >> also growing.
>> >> I am wondering why it is master6.ldf and not master.ldf.
>> >> Since it's growing, I am wondering how to make it smaller.
>> >> Thanks for help.
>>
>> >> Jason
>> > Hi
>>
>> > I suspect that the file is not part of the master data unless you are
>> > using it instead of a user database which is never a good idea!
>>
>> > The following query in SQL 2005 will give you the name of the database the
>> > file is associated with:
>>
>> > SELECT db_name(database_id),
>> > name,
>> > CASE TYPE WHEN 0 THEN 'Data' WHEN 1 THEN 'Log' ELSE 'Unknown' END AS
>> > [Type],
>> > file_id,
>> > physical_name
>> > FROM sys.master_files
>> > WHERE physical_name like '%master6%'
>>
>> > for SQL 2000 try:
>>
>> > SELECT db_name(dbid),
>> > name,
>> > fileid,
>> > filename
>> > FROM sysaltfiles
>> > WHERE filename like '%master6%'
>>
>> > John- Hide quoted text -
>>
>> - Show quoted text -
>
> Jason
>
> if that is the case you can change the database to change the recovery
> mode to simple. You sound like you don't need transaction logs anyway.
>
> Lookup recovery mode in BOL though.
>
> Paddy
>
 >> Stay informed about: SQL Server 2000 master6.ldf question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Question about Microsoft SQL Server 2000, deletion, and lo.. - All, I've been racking my brains trying to solve a deadlocking issue I've encountered and trying to find the simplest way of stating my problem so that others can help - and I think I've figured out the best way to ask. I have it all narrowed down to 2...

A question about keyword search strategy against SQL Serve.. - We have a small web application using Sql Server 2000. We would like to provide a keyword search functionality. The key word can be a location, a string in the description of certain topic or a combination of both. What I have currently is to take the...

Can you edit the result set from Studio Manager Sql Server.. - Can you edit the result set from Studio Manager Sql Server 2005 like you could in EnterpriseManager sql server 2000? I loved being able to go directly into a table in sql server 2000 enterprise manager, return a result set and just edit inline right..

Difference in result set from sql server 2000 and sql serv.. - The following query returns only about 16,000 rows under 2000 but when I run it against the same data it returns over 300,000 with many duplicate entries. Would anyone be able to tell me if I'm doing something wrong? Thanks Select tblCountryCode.Npa...

how to use sql server 2005 management tools to connect to .. - Hello, After installing SQL Server 2005, I get a message stating "You must use SQL Server 2005 management tools to connect to this server", while trying to connect to my localhost using SQL Server 2000 Enterprise Manager. Regards, junior
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]