Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't copy log file 1

Status
Not open for further replies.

yogiberr

Programmer
Oct 3, 2002
9
GB
Hi, I am trying to copy a sql 2000 datbase on to a cd rom.(DATA and LOG files)

Here's the full error message:
"Cannot copy dbName_Log:Cannot read from the source file or disk"

I had previously been able to do this.
Now, the DATA file copies no problem, but the corresponding LOG file doesn't.
I can also confirm the following:

1)Both files are in the SAME directory
2)I can copy other log files that reside in this directory.
I have looked thru the "properties" of the problem LOG file and compared them with the other LOG files, but can see no difference.

Can anyone shed any light on this?I'm losing it here :)
Many thanks,
yogi.
PS, is this the correct forum :)
 
Hi,
I still can't tranfer my LOG file.
Is there any another way that I can transfer my database from 1 machine to another?These machines are not networked.

Please help.
yogi
 
You can backup the database and log file, put the backups on a CD, and then restore them to the other server.

Hope this helps.

 
Hi, thanks for the reply.
I am kind of new to this thing, but I did a 'Database -complete' backup.
The backup completed successfuly.
I then tried to copy this file over and got the same error as before.
I'm going nuts here :).
To be honest, all i need is the data.is there any way that I can avoid the LOG altogether?
ie, simply transfer the DATA file?

I already tried to simply copy over the DATA file, but the destination sql server wouldn't let me.

any suggestions?
cheers,

yogi
 
Any Luck Yet??? From what I am reading, and correct me if I am wrong, but it looks like you have a database that resides in SQL Server 2000. You are trying to copy the data file and log files, which are your MDF and LDF respectively, to a CD.

Is this assumption correct?

Thanks

J. Kusch
 
Hi folks,
thanks for all the replies, I have literally just found the answer.(midnight here in sunny Glasgow)
I was trying to copy on to a cd ROM that didn't have enough space for the massive LDF file... :)

sorry about that.To be fair, the error message was hardly the most informative.So, now I can transfer on to cd rom.
Just out of interest, is there any way that I could transfer simply the MDF file to cd rom and then attach this MDF file to SQL Server on the second machine, ie, omit the LDF file?...
I was just curious.
Many thanks,
I am rarely THIS stupid, honest.

Cheers, yogi
 
It would be much simpler to put a database BACKUP on the cd and then restore it OVER the existing database on the second server. It's really not recommended to "copy and paste" a .mdf file over another one.

If your two SQL Servers are able to see each other over a network (or if they can connect remotely by IP), you may want to look into Replication. That way, whenever SQL Server 1 is updated, it also updates SQL Server 2, so you basically have a live copy of the database on 2 servers.

Hope This Helps!

 
Thanks bud,
I am always on the lookout for best practices :)

Cheers,
yogiberr
 
Morning ... Just wanted to comment on your question of 'Just out of interest, is there any way that I could transfer simply the MDF file to cd rom and then attach this MDF file to SQL Server on the second machine, ie, omit the LDF file?..." ... YES YOU CAN!

You would first execute a sp_detach_db command against the database you wanted from the source server.

You then would copy the MDF file of the database to it new location, on the target.

Then execute a sp_attach_single_file_db and it would attach the MDF file and create a new, empty, LDF file.


Thanks

J. Kusch
 
magic,
thanks for all the help folks. :)
I really appreciated it,
yogi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top