• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

Log getting full while Copying data

I'm trying to import one table into Mysvr. The table is has 77 GB of images and it is filling the log file and giving me errors. I already put the database in simple mode.

Can you suggest me a way of doing this in part or any other suggestion will be really appreciated.

Thank you

USE D1
INSERT  INTO [dbo].[Detail]
        (
          DetailId,
          [Id],
          [Comments],
          [UPdby],
          [UpdOn]
        )
        SELECT  nd.[DetailId],
                nd.[Id],
                nd.[Comments],
                coalesce(SUser.UserID, 1500) UPdby,
                SUser.UpdOn
        FROM    D2..Details nd
                INNER  join SUser on username = UPDBy

Open in new window

0
amedexitt
Asked:
amedexitt
1 Solution
 
Chris MConsulting - Technology ServicesCommented:
Hi,
It looks like you do not have enough space to take up this data.
Since it's already in simple mode but your log gets to grow till when the disk is full, you can alternatively first add another log file (with auto grow) which you cna place to another disk with more space, after which you can flush it and remove it.
Shirnk the current log (like to 1 MB), then limit the growth of the current log so that the log space is used up by the data files on that drive, then let the second log file (on the other drive) be the one to grow up so that you data can be imported into the database.
Therefore set the growth of the second long to unlimited.
May I know how much space you have on the database drive, how much is used and how much it's capacity is?
Thanks
0
 
amedexittAuthor Commented:

Ok I did it by runnig the following query. Basically what it does is to load the table that has not been loaded yet and it goes 20 at a time. Also I allocated the log file in the different location base on you recommendation.


USE D1
INSERT  INTO [dbo].[Detail]
        (
          DetailId,
          [Id],
          [Comments],
          [UPdby],
          [UpdOn]
        )
        SELECT  nd.[DetailId],
                nd.[Id],
                nd.[Comments],
                coalesce(SUser.UserID, 1500) UPdby,
                SUser.UpdOn
        FROM    D2..Details nd
                INNER  join SUser on username = UPDBy
                left join [dbo].[Detail] gn on gn.DetailID = nd.DetailID
        where   gn.DetailID is null
go 20

Thank you very much


0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now