Answers.Body: <p>KarinG's answer is correct.  To anticipate what you're likely to find - when you do an export, CiviCRM generates a temporary database table.  Many servers aren't configured with a large enough space in their <code>/tmp</code> directory to store a large database table.  Because "all primary fields" is actually a very large number of fields, you're likely overwhelming the temporary space.</p>
  
  <p>I recommend selecting only the fields you need rather than all primary fields, and this issue is likely to go away.  Alternatively, increase the size of your <code>/tmp</code> folder.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-05T18:31:01.053Z
Answers.LastActivityDate: 2017-08-05T18:31:01.053Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>First place to look is in the <a href="https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories">ConfigAndLog</a> directory - it will contain a number of files. Find the current log file; it will contain more details on the DB Error (if you can't easily find it -> reproduce your DB error by trying to export again -> then the DB error will be at the bottom of the current log file).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-05T13:35:57.430Z
Answers.LastActivityDate: 2017-08-05T18:27:59.947Z
Answers.LastEditDate: 2017-08-05T18:27:59.947Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>I am trying to export about 2000 contacts (exporting primary fields only) and when I click continue I get this error:</p>
  
  <blockquote>
    <p>Sorry but we are not able to provide this at the moment. DB Error:
    unknown error Return to home page.</p>
  </blockquote>
  
  <p>Not sure why its occurring and how to find out more info?</p>
  
  <p>Thanks</p>
  
Tags: <contacts><export>
Title: Exporting Contacts Results in DB Error
ThreadText: # Exporting Contacts Results in DB Error
  
  (Asked by: username_0 on 2017-08-05)
  
  I am trying to export about 2000 contacts (exporting primary fields only) and when I click continue I get this error:
  
  > Sorry but we are not able to provide this at the moment. DB Error:
  > unknown error Return to home page.
  
  Not sure why its occurring and how to find out more info?
  
  Thanks
  
  **Tags:** contacts, export
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-08-05. Score: 2 | Accepted answer
  
  KarinG's answer is correct. To anticipate what you're likely to find - when you do an export, CiviCRM generates a temporary database table. Many servers aren't configured with a large enough space in their `/tmp` directory to store a large database table. Because "all primary fields" is actually a very large number of fields, you're likely overwhelming the temporary space.
  
  I recommend selecting only the fields you need rather than all primary fields, and this issue is likely to go away. Alternatively, increase the size of your `/tmp` folder.
  
  
  ---
  
  ### Answer by username_2 on 2017-08-05. Score: 2
  
  First place to look is in the [ConfigAndLog](https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories) directory - it will contain a number of files. Find the current log file; it will contain more details on the DB Error (if you can't easily find it -> reproduce your DB error by trying to export again -> then the DB error will be at the bottom of the current log file).
  
  
  ---
  
  