Solved

Data Import problem

Posted on 2009-04-11
8
171 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
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.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL USE DATABASE VARIABLE 5 27
SQL Quer 4 21
Isolation level setting TSQL View 10 27
Need help in debugging a UDF results 7 23
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
Viewers will learn how the fundamental information of how to create a table.

856 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