Showing posts with label named. Show all posts
Showing posts with label named. Show all posts

Wednesday, March 28, 2012

Log files must be named *_log.ldf?

Hello,

I've been having problems with SQL Express when my database files are named basename.mdf and basename.ldf (e.g. on using the Access upsizing wizard).

At points that I haven't fully identified yet (I'm using VB Express clients), a second log file named basename_log.mdf gets created and SQL Express gets confused and compalins the files are corrupted.

Can anyone explain what is happening?

TIA,

Bill

SQL Server files do not really need to have a specific extension, so it might be possible that this file, although having a ldf extension is not a ldf file. Which files did the wizard create for you ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hello Jens.

My problem is not with the ldf extension but with a second transaction log file getting created.

As an example:

1) Create a new Access database namedmyDatabase.mdb (containing a single table.)

2) Use the Upsizing wizard to create a new SQL database from the Access database accepting the defaults as much as possible. This creates files named myDatabaseSQL.mdf and myDatabaseSQL.ldf in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

3) The database myDatabaseSql is already visible when you next open up MSS MSE, from where you can see the data in the one table.

4) So far everything is ok.

5) Now exit MSS MSE and start VB 2k5 Express. Without opening up any project or solution, simply open the Database Explorer and create a new connection to myDatabaseSQL. Hit the Test Connection button and once told it’s ok, immediately exit VB.

6) At this point there are now three files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data :

myDatabaseSQL.mdf

myDatabaseSQL.ldf

myDataBaseSQL_log.ldf (this one seems to be created by VB's Database Explorer)

7) Now open up MSS MSE again and try to get to table within myDatabaseSQL from the object explorer. On clicking on myDatabaseSQL you get the following error message

One or more files do not match the primary file of the database….. If this is an existing database the file may be corrupted and should be restored from a backup. (Microsoft SQL Server, Error 5173)

This behaviour is repeated on all my databases including Adventure Works and NorthWind.

I got the problem on the ‘smaller ‘ SQL Server Express + MSS MSE down loads on one machine and also get the problem with the ‘larger’ SSE with Advanced Services + Toolkit downloads on a second machine.

Both machines are running XP Pro + Office 2003 + 2005 Express versions of SS + VB.

Hope this lot help.

TIA

Bill

sql

Monday, March 26, 2012

LOG files

Hi,
I have some LOG files, the extension of the file is LOG, and I don't know
where they came from. Some of them are named after my databases, and others
are not. One is almost 4 GB in size. GB is not a typo.
These files are locked, so I have to shut down to view them. Unfortunately,
they are not TXT files, so I can't view them anyway. I tried to rename the
files, but when I try and launch the application that uses SQL, I get an
error message.
Any help on this would be greatly appreciated.In SQL Enterprise manager , right click your database, go to properties,
then select the log tab, it will list the physical names of all of the tran
logs for that database..
"DCIFRTHS" <None> wrote in message
news:#6nh9Rb6DHA.3704@.tk2msftngp13.phx.gbl...
> Hi,
> I have some LOG files, the extension of the file is LOG, and I don't know
> where they came from. Some of them are named after my databases, and
others
> are not. One is almost 4 GB in size. GB is not a typo.
> These files are locked, so I have to shut down to view them.
Unfortunately,
> they are not TXT files, so I can't view them anyway. I tried to rename
the
> files, but when I try and launch the application that uses SQL, I get an
> error message.
> Any help on this would be greatly appreciated.
>|||Okay. I have identified the log files, but I am still a bit confused. Why
are they listed as log files? I thought the transaction logs were the LDF
files?
Do you have any advice for truncating these logs and what settings are best
for them? How do I determine what information, and the date of the
information in these files?
Thanks so much !
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:esOBgDc6DHA.2692@.TK2MSFTNGP09.phx.gbl...
> In SQL Enterprise manager , right click your database, go to properties,
> then select the log tab, it will list the physical names of all of the
tran
> logs for that database..
> "DCIFRTHS" <None> wrote in message
> news:#6nh9Rb6DHA.3704@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have some LOG files, the extension of the file is LOG, and I don't
know
> > where they came from. Some of them are named after my databases, and
> others
> > are not. One is almost 4 GB in size. GB is not a typo.
> >
> > These files are locked, so I have to shut down to view them.
> Unfortunately,
> > they are not TXT files, so I can't view them anyway. I tried to rename
> the
> > files, but when I try and launch the application that uses SQL, I get an
> > error message.
> >
> > Any help on this would be greatly appreciated.
> >
> >
>|||The LOG extension is commonly used for ODBC tracing. You'd want to check that (administrative tools,
ODBC).
> Why
> are they listed as log files?
Listed by who? Are then named .LOG? And are really database transaction log files? If so, ask the
person who created the database.
> I thought the transaction logs were the LDF
> files?
That is the recommendation, but you can name the files anyway you want.
> How do I determine what information, and the date of the
> information in these files?
If these are truly transaction log file, they are in binary format. You need 3:rd party app to read
the stuff, like Log Explorer from www.lumigent.com.
> Do you have any advice for truncating these logs and what settings are best
> for them?
Check out below KB articles:
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/default.aspx?scid=kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/default.aspx?scid=kb;en-us;272318
Log File Grows too big
http://www.support.microsoft.com/?id=317375
Log file filling up
http://www.support.microsoft.com/?id=110139
Considerations for Autogrow and AutoShrink
http://www.support.microsoft.com/?id=315512
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"DCIFRTHS" <None> wrote in message news:ep3L33c6DHA.1556@.tk2msftngp13.phx.gbl...
> Okay. I have identified the log files, but I am still a bit confused. Why
> are they listed as log files? I thought the transaction logs were the LDF
> files?
> Do you have any advice for truncating these logs and what settings are best
> for them? How do I determine what information, and the date of the
> information in these files?
> Thanks so much !
> "Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
> news:esOBgDc6DHA.2692@.TK2MSFTNGP09.phx.gbl...
> > In SQL Enterprise manager , right click your database, go to properties,
> > then select the log tab, it will list the physical names of all of the
> tran
> > logs for that database..
> >
> > "DCIFRTHS" <None> wrote in message
> > news:#6nh9Rb6DHA.3704@.tk2msftngp13.phx.gbl...
> > > Hi,
> > >
> > > I have some LOG files, the extension of the file is LOG, and I don't
> know
> > > where they came from. Some of them are named after my databases, and
> > others
> > > are not. One is almost 4 GB in size. GB is not a typo.
> > >
> > > These files are locked, so I have to shut down to view them.
> > Unfortunately,
> > > they are not TXT files, so I can't view them anyway. I tried to rename
> > the
> > > files, but when I try and launch the application that uses SQL, I get an
> > > error message.
> > >
> > > Any help on this would be greatly appreciated.
> > >
> > >
> >
> >
>|||Hi,
I am just checking on your progress regarding the information we provided you. Thanks for
Tibors efforts on your issue and I wonder if we have answered your question. If you
encounter any difficulty, please do not hesitate to let us know. Please post here and let us
know the status of your issue.
Looking forward to hearing from you soon...
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

LOG files

Hi,
I have some LOG files, the extension of the file is LOG, and I don't know
where they came from. Some of them are named after my databases, and others
are not. One is almost 4 GB in size. GB is not a typo.
These files are locked, so I have to shut down to view them. Unfortunately,
they are not TXT files, so I can't view them anyway. I tried to rename the
files, but when I try and launch the application that uses SQL, I get an
error message.
Any help on this would be greatly appreciated.In SQL Enterprise manager , right click your database, go to properties,
then select the log tab, it will list the physical names of all of the tran
logs for that database..
"DCIFRTHS" <None> wrote in message
news:#6nh9Rb6DHA.3704@.tk2msftngp13.phx.gbl...
quote:

> Hi,
> I have some LOG files, the extension of the file is LOG, and I don't know
> where they came from. Some of them are named after my databases, and

others
quote:

> are not. One is almost 4 GB in size. GB is not a typo.
> These files are locked, so I have to shut down to view them.

Unfortunately,
quote:

> they are not TXT files, so I can't view them anyway. I tried to rename

the
quote:

> files, but when I try and launch the application that uses SQL, I get an
> error message.
> Any help on this would be greatly appreciated.
>
|||Okay. I have identified the log files, but I am still a bit confused. Why
are they listed as log files? I thought the transaction logs were the LDF
files?
Do you have any advice for truncating these logs and what settings are best
for them? How do I determine what information, and the date of the
information in these files?
Thanks so much !
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:esOBgDc6DHA.2692@.TK2MSFTNGP09.phx.gbl...
quote:

> In SQL Enterprise manager , right click your database, go to properties,
> then select the log tab, it will list the physical names of all of the

tran
quote:

> logs for that database..
> "DCIFRTHS" <None> wrote in message
> news:#6nh9Rb6DHA.3704@.tk2msftngp13.phx.gbl...
know[QUOTE]
> others
> Unfortunately,
> the
>
|||The LOG extension is commonly used for ODBC tracing. You'd want to check tha
t (administrative tools,
ODBC).
quote:

> Why
> are they listed as log files?

Listed by who? Are then named .LOG? And are really database transaction log
files? If so, ask the
person who created the database.
quote:

> I thought the transaction logs were the LDF
> files?

That is the recommendation, but you can name the files anyway you want.
quote:

> How do I determine what information, and the date of the
> information in these files?

If these are truly transaction log file, they are in binary format. You need
3:rd party app to read
the stuff, like Log Explorer from www.lumigent.com.
quote:

> Do you have any advice for truncating these logs and what settings are bes
t
> for them?

Check out below KB articles:
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/defaul...kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/defaul...kb;en-us;272318
Log File Grows too big
http://www.support.microsoft.com/?id=317375
Log file filling up
http://www.support.microsoft.com/?id=110139
Considerations for Autogrow and AutoShrink
http://www.support.microsoft.com/?id=315512
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"DCIFRTHS" <None> wrote in message news:ep3L33c6DHA.1556@.tk2msftngp13.phx.gbl...
quote:
red">
> Okay. I have identified the log files, but I am still a bit confused. Why
> are they listed as log files? I thought the transaction logs were the LDF
> files?
> Do you have any advice for truncating these logs and what settings are bes
t
> for them? How do I determine what information, and the date of the
> information in these files?
> Thanks so much !
> "Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
> news:esOBgDc6DHA.2692@.TK2MSFTNGP09.phx.gbl...
> tran
> know
>
|||Hi,
I am just checking on your progress regarding the information we provided yo
u. Thanks for
Tibors efforts on your issue and I wonder if we have answered your question.
If you
encounter any difficulty, please do not hesitate to let us know. Please post
here and let us
know the status of your issue.
Looking forward to hearing from you soon...
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.