Solved

Data Import problem

Posted on 2009-04-11
8
168 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
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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

760 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now