What is the path and file name(s) of the database?

I'm super frustrated. My Smart Content has vanished (again). Some of it reappeared for a while (new installs), but now it's all gone.

Where EXACTLY is the Postgre database file? And what is its filename (with extension)?

Thanks!

 

Comments

  • namffuaknamffuak Posts: 4,069

    Fire up Studio, click on edit -> preferences. Right hand tab, CMS settings. This is also where you change it if you want to.

  • Thank you for taking the time to read my question. However, you did not provide an answer I can use. Following your directions (which I have followed in the past after reading similar advice in other threads), I performed the following steps and do not find anything resembling a database file (is there a single file? Am I looking for something else entirely?)

    1. I press F2 to open preferences and then click on the CMS Settings tab (see screenshot 1). I see a path on my C Drive. I navigate there using Windows Explorer.
    2. As shown in screenshot 2, I see the CMS folder and open it.
    3. In screenshot 3, you can see that I see a folder called "Content Cluster." Being adventurous (and knowing that a *.json file is not a database file), I enter the Cluster...
    4. And I'm left wondering what to do next. As you can see in screenshot 4, there are a LOT of files and folders here, none of which look like a database to me. I admit, I'm only familiar with Access, MySQL and MS SQL Server and not at all familiar with Postgre SQL, so I'm not sure what I should be looking for. Do I need to delete everything in this folder? Just the base or global directories? Please tell me what to do to delete the current database.

     

    Thank you.

    Mike

     

    Daz01_Preferences.jpg
    668 x 234 - 29K
    Daz02_CMSfolder.jpg
    873 x 562 - 62K
    Daz03_ContentCluster.jpg
    873 x 562 - 60K
    Daz04_Files.jpg
    873 x 732 - 94K
  • namffuaknamffuak Posts: 4,069

    To delete the database just delete the content cluster directory; everything under it is the database and database support - logs, recovery logs, actual content, the whole ball of wax. And when you start either DIM or Studio again it will be re-created. To repopulate it, use Studio run the reimport metadata process in the database maintenance panel.

  • KeryaKerya Posts: 10,943

    Did you try to do a Content DB Maintenance?

    https://helpdaz.zendesk.com/entries/45231914-PostgreSQL-FAQ#q11

  • Kerya: Yes, I did. Multiple times. It has failed to resolve my problem, which is why I am attempting to go deeper. Thank you VERY MUCH for taking the time to respond, but the link you provided did not answer my question.

  • mmitchell_houstonmmitchell_houston Posts: 2,472
    edited September 2015

    Based on my reading of this discussion ( http://stackoverflow.com/questions/1137060/where-does-postgresql-store-the-database ), I believe the answer to be (on Win7 with Daz Studio 4.8):

    On windows7 the databases are referred to by a number in the file named pg_database under 
    C:\Program Files (x86)\PostgreSQL\8.2\data\global.
    Then you should search for the folder name by that number under 

    C:\Program Files (x86)\PostgreSQL\8.2\data\base.
    That is the content of the database.

    Based on this, there is no single database file, but a series of files stored in a directory (probably the base directory, but possibly also the global directory). These various file names are just strings of numbers. I also think the pg_database directory contains what is called a page file (and it is unreadable in a text editor) that coordinates these various, small files into a working database.

    namffuak: So, deleting everything in the cluster directory should cure it, eh? I'll give it a try.

    Post edited by mmitchell_houston on
  • namffuaknamffuak Posts: 4,069

    Uninstalling Poatgres does not delete the database. You'll have to do that yourself.

  • namffuak Thank you. I'll delete the cluster directory and let you know how it goes.

  • namffuaknamffuak Posts: 4,069
    edited September 2015

    Uninstalling Postgres does not delete the database. You'll have to do that yourself. And it would be best to delete everything under the directory, not pieces - it all gets created and used as a unit.

    ETA - stupid double post! Sorry, browser crashed.

    Post edited by namffuak on
  • No problem. I'll give it a whirl tonight and let people know what worked.

  • frank0314frank0314 Posts: 13,416

    Just go to your task manager and in processes see if you have ContentManagmentServises or Postgre running.

  • frank0314: I probably should have mentioned that this is an extension of another thread where I confirmed that all the services are running correctly. When I finally decided to kill the database entirely, I started this new thread. 

    My real concern is that this happened twice in a row while installing new content. The first time everything went away, I responded by performing the usual DB maintenance and reimported the metadata. As usual, that did correct the problem. The second time I installed new content, though, everything went away and stayed away. The usual checks and maintenance (all services were working correctly, resetting the DB and reimporting metadata) did not work.

    I didn't have time to try this tonight, but I will tomorrow. I'm hoping for the best.

  • namffuaknamffuak Posts: 4,069

    There is one other possibility here - I've done it to myself at times - If you shut DIM down and immediately fire up Studio, it can come up just as Postgres shuts down. If this hits again, try this: use the options tab from the content library pane (not smart content) and click on 'start cms' (this will show in task manager as Studio running but no postgres processes). Other than that, I can't think of anything that would be causing Postgres to quit.

  • KeryaKerya Posts: 10,943

    Uhm ... I hope it is not the case ... but I think I should mention it ... run a check on your harddrive.

    I had a PM conversation back and forth with somebody who had a BIG problem, because downloading/installing DazStudio and content with DIM DELETED his content ... he thought.

    A bit later he found out that his harddrive was dying and it had nothing to do with DIM or DS ...

  • mjc1016mjc1016 Posts: 15,001

    I think, you mentioned you use AVG, right?

    Double check that it isn't blocking Postgre...a few times (far fewer than many others) in the past 3 yrs has an update started causing problems.  Basically any database software is a network application and is very susceptible to AV/security software interferrence.

  • mjc1016: Thanks for the tip, and I will follow up on it if I continue to have issues I rebuild the DB (probably tonight, but possibly tomorrow night), but I really doubt that is the culprit. When I initially set up the virus software I confirmed that it was not interfering with any of the databases I run on my computer. In addition to 3D, I also do Web design, so I routinely have MySQL and Access databases running as part of a Web development environment (I'm swapping between Apache and the MS Web server all the time). There's no indication that any of my databases or Web Services are being affected by AVG or my firewall.

    I do not believe that the CMS/Postgre is bing blocked as a service. I can see it running in Device Manager and, when it fails, the first indication is that there are missing thumbnails or content that doesn't appear (in other words, I'm asking, "Where the heck is xxx product?"). If the service were blocked, I would expect everything to vanish at once. Also, I had noticed (prior to the complete crash) that searches and refreshes of the Smart Content pane were beginning to slow down (signs of a corrupt DB?).

    To me, these don't seem like connection issues, but problems with the database integrity itself. If this were a multi-user environment, my suspicion would be that there were pagefile locks that were not being released in a timely manner due to too many simultaneous connections (this used to be a big problem in Access 97, but has generally been resolved by modern DB Drivers). I suppose it is possible that the Daz software is making too many simultaneous calls, but that just seems unlikely.

    I am already more than a little familiar with the DBs I mentioned above, and I guess that's why I had such a problem switching to this one. I expected to find a single file that could be removed (like Access) or one-file-per-table like MySQL. The Postgre structure just threw me, and I began to suspect there was some sort of custom install going on here. 

    I'll read up on it some more and -- hopefully -- resolve this issue soon. I really only have a small amount of time in the evenings on weeknights that I can work on 3D, and I would rather spend it creating art than rebuilding my database every night.

  • mjc1016mjc1016 Posts: 15,001

    You're not running MySQL and Postgre at the same time? 

    There shoudln't be any conflicts.  But if they are, somehow, iusing the same port, there could be.  With the typical result being one or both databases being corrupted.

  • Nope. I'm not developing any web sites right now, so my development environment is turned off to conserve resources (web servers are off, MS SQL is off -- and I know Apache MySQL is off because I have to manually swap between the two environment options because of the aforementioned port issues).

  • STATUS UPDATE: I did not have to delete the database manually (at least not yet). Here's what I did:

    1. I booted up last night.
    2. Opened Daz Studio and selected DB Maintenance (right-click on Smart Content pane).
    3. I reset the database.
    4. I closed Daz Studio.
    5. I stopped the Content Management Service (Start Menu > Daz 3D > Daz Content Management Service).
    6. I then immediately restarted it (it's in the same location as step 5).
    7. I then opened Daz Studio.
    8. I right-clicked on the Smart Content Pane and this time I selected both Reset Database and Reimport Metadata.
    9. This time it worked. My smart Content is back.

    We'll see if it stays back. I did install new content last night through the Install Manager. I made sure Daz Studio was off at the time (just in case)

    I think I'm going to copy the entire CMS directory to a flash drive and -- if this happens again -- I'm going to just manually replace the folder and see if that works.

    Thanks to everyone for their help, and I'll keep you posted.

  • Kerya: just reread the entire thread and saw your comment (don't know how I missed it before). This is a brand new hard drive. I recently cloned my old 350 GB HD to a 1 TB HD. I have had a few issues with getting Microsoft to recognize the upgrade, but all other aspects of the upgrade are working perfectly. Good advice, though -- I hope if someone else reads this thread in the future that they will consider that as a possible culprit.

  • KeryaKerya Posts: 10,943

    Nice to hear you got it solved!

    And very nice that it's not the hard drive!

  • Sigh. Nope. Not THAT hard drive. Another one just died, though. Thank goodness for Carbonite!

Sign In or Register to comment.