Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Latest OS X Server update removed my device_management database?

Hello,


I recently updated my OS X Mountain Lion Server version to 2.2 and I can't seem to find my device_management database in the postgres database?


I've been backing up my database and now can no longer find it. When I start up profile manager it definitely starts up and has data in it? Is there some other location for the database now? WHAT Happened?


Any ideas would be helpful...


I currently see this:


Name | Owner | Encoding | Collate | Ctype | Access privileges

-----------+-----------+----------+---------+-------+-------------------------

postgres | _postgres | UTF8 | C | C |

template0 | _postgres | UTF8 | C | C | =c/_postgres +

| | | | | _postgres=CTc/_postgres

template1 | _postgres | UTF8 | C | C | _postgres=CTc/_postgres+

| | | | | =c/_postgres


where on my test Profile Manager machine with the same update I see this:


ostgres=# \l

List of databases

Name | Owner | Encoding | Collate | Ctype | Access privileges

------------------+-----------+----------+---------+-------+-------------------- -----

device_inventory | _postgres | UTF8 | C | C |

postgres | _postgres | UTF8 | C | C |

template0 | _postgres | UTF8 | C | C | =c/_postgres +

| | | | | _postgres=CTc/_postgres

template1 | _postgres | UTF8 | C | C | _postgres=CTc/_postgres+

| | | | | =c/_postgres

test | _postgres | UTF8 | C | C |

OS X Mountain Lion (10.8.2)

Posted on Dec 11, 2012 4:53 PM

Reply
4 replies

Dec 12, 2012 8:47 AM in response to toddatkuapay

So there are now 2 postgres servers running and I can't connect to the /Library/Server/PostgreSQL For Server Services...


The reason for this is that psql is pointing to the original location of the socket directory. By simply shutting down the 2nd instance of the Postgres database and linking the running socket in the original socket directory - you can connect to the /Library/Server/PostgreSQL for Server Services instance.


Simply put:


1.) launchctl remove org.postgresql.postgres

2.) launchctl list | grep postgre

3.) ln -s /Library/Server/PostgreSQL\ For\ Server\ Services/Socket/.s.PGSQL.5432 /var/pgsql_socket/.s.PGSQL.5432


And you can connect to the database you need by:


psql -U _postgres -d postgres

Latest OS X Server update removed my device_management database?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.