pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPGSQL manager password lost.
4+ messages / 3 participants
[nested] [flat]
* PGSQL manager password lost.
@ 2006-11-23 01:49 Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>
0 siblings, 2 replies; 4+ messages in thread
From: Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd @ 2006-11-23 01:49 UTC (permalink / raw)
To: pgsql-admin
Hi folks, new to this mailing group and here are my first questions.
We've been running a PGSQL database for a while now on a Weenblows 2K
server, on version 8.0.something.
Our resident DBA has been shown the door and has taken with himself the
admin password to get into the databases we run in PostGreSQL.
Question 1: Is there any way to recover and/or reset the administrator
password in a database or do I have to recreate the db from scratch?
Question 2: One of the DB's we run in PGSQL for reasons outside my control
needs to be moved to M$-SQL server. Is there any way that anyone is aware of
that I can export the database definition and data (table structures, views
etc) into a format usable by SQL server - I know M$ speaks it's own version
of SQL which I've run into problems with in the past. Just looking for some
suggestions on what I can do, otherwise I have to wade through a few
thousand lines of SQL to make it workable in M$. Is is possible to pipe
table structures/views through an ODBC connection? Is this something I
should be asking on M$ forums?
--
Paul Lambert
Database Administrator
Infomedia Ltd. - Business Systems Division
Email: plambert@infomedia.com.au <mailto:plambert@infomedia.com.au>
<http://www.infomedia.com.au <http://www.infomedia.com.au/; >
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PGSQL manager password lost.
@ 2006-11-23 02:21 Richard Broersma Jr <rabroersma@yahoo.com>
parent: Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>
1 sibling, 1 reply; 4+ messages in thread
From: Richard Broersma Jr @ 2006-11-23 02:21 UTC (permalink / raw)
To: Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>; pgsql-admin
> Hi folks, new to this mailing group and here are my first questions.
>
> We've been running a PGSQL database for a while now on a Weenblows 2K
> server, on version 8.0.something.
>
> Our resident DBA has been shown the door and has taken with himself the
> admin password to get into the databases we run in PostGreSQL.
>
> Question 1: Is there any way to recover and/or reset the administrator
> password in a database or do I have to recreate the db from scratch?
if you edit your pg_hba.conf file to trust for user postgres, you will be able to log in without
any password once you restart postgresql. From there you are able to chance what ever passwords
you want.
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
>
> Question 2: One of the DB's we run in PGSQL for reasons outside my control
> needs to be moved to M$-SQL server. Is there any way that anyone is aware of
> that I can export the database definition and data (table structures, views
> etc) into a format usable by SQL server - I know M$ speaks it's own version
> of SQL which I've run into problems with in the past. Just looking for some
> suggestions on what I can do, otherwise I have to wade through a few
> thousand lines of SQL to make it workable in M$.
if you use the dos command pg_dump, or pg_dumpall you can dump these database and other objects
just a sql script file will DDL and data. However, you will have to read the help files on
pg_dump to decided what information you want to have added to the sql script.
http://www.postgresql.org/docs/8.2/interactive/backup-dump.html
Is is possible to pipe
> table structures/views through an ODBC connection?
yes postgresql a odbc driver that you can use, it also has an oledb driver but my understanding
is that it isn't as polished as the ODBC driver.
http://pgfoundry.org/projects/psqlodbc/
Is this something I
> should be asking on M$ forums?
You may in-fact find prebuilt scripts that will automated most of this for you there, but I would
know one way or the other. In the future, if "the powers at be" what to give the most
powerful/versatile Open Source RDMS a second try, you will find plenty of tools and script to port
or MS-SQL to Postgresql.
I hope your other DBA was canned for being a stanch Postgresql supporter. :o)
Regards,
Richard Broersma Jr.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PGSQL manager password lost.
@ 2006-11-23 02:25 adey <adey11@gmail.com>
parent: Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>
1 sibling, 0 replies; 4+ messages in thread
From: adey @ 2006-11-23 02:25 UTC (permalink / raw)
To: Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>; +Cc: pgsql-admin
If you do a pgdump -s will dump out schema only from the Postgres database.
Much of this will be usable in SQL server to at least create your basic
database and objects. You will then need to interpret the remianing more
complex structures and build them / adapt the DDL, to work in SQL Server.
If you have PGAdmin you should be able to login to the Postgres database as
a superuser and change the admin password, but be careful to change any
applications that may be using that login to access Postgres.
On 11/23/06, Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <
plambert@bsd.infomedia.com.au> wrote:
>
> Hi folks, new to this mailing group and here are my first questions.
>
> We've been running a PGSQL database for a while now on a Weenblows 2K
> server, on version 8.0.something.
>
> Our resident DBA has been shown the door and has taken with himself the
> admin password to get into the databases we run in PostGreSQL.
>
> Question 1: Is there any way to recover and/or reset the administrator
> password in a database or do I have to recreate the db from scratch?
>
> Question 2: One of the DB's we run in PGSQL for reasons outside my control
> needs to be moved to M$-SQL server. Is there any way that anyone is aware of
> that I can export the database definition and data (table structures, views
> etc) into a format usable by SQL server - I know M$ speaks it's own version
> of SQL which I've run into problems with in the past. Just looking for some
> suggestions on what I can do, otherwise I have to wade through a few
> thousand lines of SQL to make it workable in M$. Is is possible to pipe
> table structures/views through an ODBC connection? Is this something I
> should be asking on M$ forums?
>
> --
> Paul Lambert
> Database Administrator
> Infomedia Ltd. - Business Systems Division
> Email: *plambert@infomedia.com.au* <plambert@infomedia.com.au> <*
> http://www.infomedia.com.au* <http://www.infomedia.com.au/>;
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PGSQL manager password lost.
@ 2006-11-23 03:28 Richard Broersma Jr <rabroersma@yahoo.com>
parent: Richard Broersma Jr <rabroersma@yahoo.com>
0 siblings, 0 replies; 4+ messages in thread
From: Richard Broersma Jr @ 2006-11-23 03:28 UTC (permalink / raw)
To: Richard Broersma Jr <rabroersma@yahoo.com>; Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>; pgsql-admin
oops...
I fat fingered that one...>
> I hope your other DBA wasn't canned for being a stanch Postgresql supporter. :o)
^^^
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-11-23 03:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-23 01:49 PGSQL manager password lost. Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd <plambert@bsd.infomedia.com.au>
2006-11-23 02:21 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-11-23 03:28 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-11-23 02:25 ` adey <adey11@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox