Backup DB not getting connected
Hi,
I took a back up of my database and restored it in a new DB..When I'm trying
to connect to the new DB from a client machine using ECPG connection
techniques, it says newDB doesn't exist.
There's another DB in the same DB server and if I try and connect to that DB
then it doesn't cry over anything.
Thanks
Jas
J S B wrote:
Hi,
I took a back up of my database and restored it in a new DB..When I'm
trying
to connect to the new DB from a client machine using ECPG connection
techniques, it says newDB doesn't exist.
There's another DB in the same DB server and if I try and connect to
that DB
then it doesn't cry over anything.Thanks
Jas
I am guessing that you can verify that the newDB exists and has the data
you just have trouble from the ECPG client from any machine.
I would check access privileges - does the user you log in as using ECPG
have access to newDB? - the 'DB doesn't exist' may be a wrong error
which should say access denied.
The user in the client machine is usrxyz (a unix user role) and user role
that owns newDB is userxyz (a db user role)....
works fine with another database in the same database server with same user
role combination.
Don't know whats going wrong..
Show quoted text
On 10/13/06, Shane Ambler <pgsql@007marketing.com> wrote:
J S B wrote:
Hi,
I took a back up of my database and restored it in a new DB..When I'm
trying
to connect to the new DB from a client machine using ECPG connection
techniques, it says newDB doesn't exist.
There's another DB in the same DB server and if I try and connect to
that DB
then it doesn't cry over anything.Thanks
JasI am guessing that you can verify that the newDB exists and has the data
you just have trouble from the ECPG client from any machine.I would check access privileges - does the user you log in as using ECPG
have access to newDB? - the 'DB doesn't exist' may be a wrong error
which should say access denied.
The only diff b/w the two DBs is that the one getting connected has ACL
value as blank and the one that doesn't get connected has the same ACL
property values = {}
Show quoted text
On 10/13/06, Shane Ambler <pgsql@007marketing.com> wrote:
J S B wrote:
Hi,
I took a back up of my database and restored it in a new DB..When I'm
trying
to connect to the new DB from a client machine using ECPG connection
techniques, it says newDB doesn't exist.
There's another DB in the same DB server and if I try and connect to
that DB
then it doesn't cry over anything.Thanks
JasI am guessing that you can verify that the newDB exists and has the data
you just have trouble from the ECPG client from any machine.I would check access privileges - does the user you log in as using ECPG
have access to newDB? - the 'DB doesn't exist' may be a wrong error
which should say access denied.
"J S B" <jsbali@gmail.com> writes:
The user in the client machine is usrxyz (a unix user role) and user role
that owns newDB is userxyz (a db user role)....
I notice you keep spelling it as "newDB" ... is there a case-folding
issue here perhaps?
regards, tom lane
well, newDB is the name of the database and that what I'm tryin to connect.
I'm tryin to keep it the same case in ECPG code as it is in the Database.
Do u mean to say that combination of upper and lower case is not allowed?
in newDB , 'new' is all lower case and 'DB' is all upper.
Thanks,
Jas
Show quoted text
On 10/13/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"J S B" <jsbali@gmail.com> writes:
The user in the client machine is usrxyz (a unix user role) and user
role
that owns newDB is userxyz (a db user role)....
I notice you keep spelling it as "newDB" ... is there a case-folding
issue here perhaps?regards, tom lane
"J S B" <jsbali@gmail.com> writes:
well, newDB is the name of the database and that what I'm tryin to connect.
I'm tryin to keep it the same case in ECPG code as it is in the Database.
Do u mean to say that combination of upper and lower case is not allowed?
No, I mean to say that names will get downcased in some situations if
not double-quoted. I wonder whether your database is *really* named
"newDB" and not "newdb" ... if it is, you probably need double quotes in
your ECPG call, and if it isn't, you probably need to spell it as newdb
not newDB in ECPG.
regards, tom lane
i changed my connection string as follows keeping newDB in double quotes
EXEC SQL CONNECT TO tcp:postgresql://192.168.1.1:5432/"newDB"
Unfortunately these doulbe quotes lead to syntax error.
Can you tell me what is the right syntax for the same.
Thanks
Show quoted text
On 10/13/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"J S B" <jsbali@gmail.com> writes:
well, newDB is the name of the database and that what I'm tryin to
connect.
I'm tryin to keep it the same case in ECPG code as it is in the
Database.
Do u mean to say that combination of upper and lower case is not
allowed?
No, I mean to say that names will get downcased in some situations if
not double-quoted. I wonder whether your database is *really* named
"newDB" and not "newdb" ... if it is, you probably need double quotes in
your ECPG call, and if it isn't, you probably need to spell it as newdb
not newDB in ECPG.regards, tom lane