Solved

Data Import problem

Posted on 2009-04-11
8
169 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

22 Experts available now in Live!

Get 1:1 Help Now