Solved

Data Import problem

Posted on 2009-04-11
8
173 Views
Last Modified: 2013-11-10
Hello, I'm trying to import data from local database to production, at first I kept getting this error.

Could not allocate a new page for database 'database' because of insufficient disk space in filegroup 'PRIMARY'

So I googled for a while, made sure the files were set for autogrowth. After this error went away now this other error keeps showing.

The transaction log for database 'database' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases.

I have been looking on google for hours and every possible solution fails. If anyone can point me to the right direction I would appreciate it.
0
Comment
Question by:siancell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24122393
The error means that the drive or partition in which you had kept your *.mdf and *.ldf files are full.

You can fix this problem by adding more space in the existing drive or

1. Right Click your Database in SSMS.
2. Choose Properties --> Files and then Click Add.
3. Choose File type as Secondary and place your file into a new partition where you have enough space.

After this if you try to import you wont face any issues.
0
 
LVL 4

Author Comment

by:siancell
ID: 24122467
That does not seem to be the problem, because there is more than enough space on the drive. However I got it to work by increasing the initial size of the database's log file. Is there a reason why it wont let me take off the size restriction for the log file? When I try to set the log file to unrestricted size, it does not error out which means it should of applied the changes, however when I got into the properties again the file size restrictions are still applied to ~2 MB.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24122689
Ok. Try this to resolve your issue.

1. Right Click your Database in SSMS.
2. Choose Properties --> Files and then Click on your Log File and Click Delete.
3. Now Click Add and then add a new Log File and configure your Initial Log File Size, Autogrowth or Restrict values accordingly.

This should work fine now.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Author Comment

by:siancell
ID: 24122920
Nope that still did not work. I found out that this cannot be changed according to the sources below.

http://www.exactsoftware.com/docs/DocView.aspx?DocumentID={2b24915c-66b5-4cec-a70b-e3cb414b8821}


http://www.phwinfo.com/forum/ms-sqlserver-server/332343-change-autogrowth-log-file-sql-2005-a.html
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24122956
Ok.. Give it a last try using this method:

1. Copy your MDF and LDF Files to a new location.
2. Delete your Database.
3. Right Click Databases in SSMS.
4. Choose Attach and then Add your MDF file alone.
5. Dont choose your LDF File.
6. Attach it and then go to SSMS and then follow as mentioned in comment 4122689

This should help you out.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24123995
>>I found out that this cannot be changed according to the sources below.<<
You really need to read the links you posted more carefully:
<quote>
"Solution: The Maximum File Size showing in the Restricted File Growth window, 2,097,152 MB translates to 2TB (Terabyte) which is the maximum size for a transaction log file. So, in effect, you still have the Unrestricted File Growth setting. Microsoft says this is only a presentation quirk and not bug."
</quote>
0
 
LVL 2

Accepted Solution

by:
TejasShahMscIT earned 500 total points
ID: 24124557
Hi,

Do you have configured replication before? I think you have, then you need to remove replication properly.

You need to take back up of transaction log file and then shrink it.

and try to shrink log file as:

http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/


Thanks,

Tejas
0
 
LVL 4

Author Closing Comment

by:siancell
ID: 31569189
acperkins-- thanks i guess i should.

rrjegan17--still did not work

TejasShahMscIT--did the trick, thanks alot
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question