PGSQL manager password lost.

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C70EA1.9D3D1CE0
Content-Type: text/plain

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 [at] infomedia.com.au <mailto:plambert [at] infomedia.com.au>
<http://www.infomedia.com.au <http://www.infomedia.com.au/> >




------_=_NextPart_001_01C70EA1.9D3D1CE0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.45">
<TITLE>PGSQL manager password lost.</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi folks, new to this mailing group =
and here are my first questions.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">We've been running a PGSQL database =
for a while now on a Weenblows 2K server, on version =
8.0.something.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">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.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">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?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">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?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">--<BR>
Paul Lambert<BR>
Database Administrator<BR>
Infomedia Ltd. - Business Systems Division<BR>
Email: </FONT><A HREF=3D"mailto:plambert [at] infomedia.com.au"><U><FONT =
COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">plambert [at] infomedia.com.au</FONT></U></A><FONT SIZE=3D2 =
FACE=3D"Arial"> <</FONT><A =
HREF=3D"http://www.infomedia.com.au/"><U><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">http://www.infomedia.com.au</FONT></U></A><FONT =
SIZE=3D2 FACE=3D"Arial">><BR>
</FONT>
</P>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C70EA1.9D3D1CE0--
&quot;Paul Lambert, H [ Do, 23 November 2006 02:49 ] [ ID #1545470 ]

Re: PGSQL manager password lost.

> 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 cha=
nce what ever passwords
you want.

http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-c onf.html

>
> Question 2: One of the DB's we run in PGSQL for reasons outside my cont=
rol
> needs to be moved to M$-SQL server. Is there any way that anyone is awa=
re of
> that I can export the database definition and data (table structures, v=
iews
> etc) into a format usable by SQL server - I know M$ speaks it's own ver=
sion
> 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 data=
base 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 scr=
ipt.

http://www.postgresql.org/docs/8.2/interactive/backup-dump.h tml

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 driv=
er 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 fo=
r 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.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Richard Broersma Jr [ Do, 23 November 2006 03:21 ] [ ID #1545471 ]

Re: PGSQL manager password lost.

------=_Part_39796_30400203.1164248706637
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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 [at] 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 [at] infomedia.com.au* <plambert [at] infomedia.com.au> <*
> http://www.infomedia.com.au* <http://www.infomedia.com.au/>>
>
>
>

------=_Part_39796_30400203.1164248706637
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>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.
</div>
<div> </div>
<div>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.<br><br>
 </div>
<div><span class="gmail_quote">On 11/23/06, <b class="gmail_sendername">Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd</b> <plambert [at] bsd.infomedia.com.au> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<p><font face="Arial" size="2">Hi folks, new to this mailing group and here are my first questions.</font> </p>
<p><font face="Arial" size="2">We've been running a PGSQL database for a while now on a Weenblows 2K server, on version 8.0.something.</font> </p>
<p><font face="Arial" size="2">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.</font></p>
<p><font face="Arial" size="2">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?</font></p>
<p><font face="Arial" size="2">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?
</font></p>
<p><font face="Arial" size="2">--<br>Paul Lambert<br>Database Administrator<br>Infomedia Ltd. - Business Systems Division<br>Email: </font><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:plambert [at] infomedia.com.au" target="_blank">
<u><font face="Arial" color="#0000ff" size="2">plambert [at] infomedia.com.au</font></u></a><font face="Arial" size="2"> <</font><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.infomedia.com.au/" target="_blank">
<u><font face="Arial" color="#0000ff" size="2">http://www.infomedia.com.au</font></u></a><font face="Arial" size="2">><br></font></p><br> </div></blockquote></div><br>

------=_Part_39796_30400203.1164248706637--
adey [ Do, 23 November 2006 03:25 ] [ ID #1545472 ]

Re: PGSQL manager password lost.

oops...

I fat fingered that one...>

> I hope your other DBA wasn't canned for being a stanch Postgresql suppo=
rter. :o)
^^^

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo [at] postgresql.org so that your
message can get through to the mailing list cleanly
Richard Broersma Jr [ Do, 23 November 2006 04:28 ] [ ID #1545474 ]
Datenbanken » gmane.comp.db.postgresql.admin » PGSQL manager password lost.

Vorheriges Thema: Archive WAL Logs Failed
Nächstes Thema: Monitoring PostgreSQL Process