Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

10gR2 Database link - Invalid syntax for password starting with number

640137Jul 28 2011 — edited Sep 17 2013
I'm am trying to connect from one database to another. I have done this many times before, but today, I have a strange problem.

The create database link command will not accept a password beginning with a number.

The strange this is, it has before. I have another database configured to use the same account on the target database, and it works fine. It has been working like that for several years. Now when creating a new database link it wont let me do it!

Note, create database link command does not check to ensure the user/password/dbname is valid when creating, you put garbage in there and it will create the link, it will fail when you access it though.

So in the spool below you can see it accepts a password with out a starting number but then rejects the others.



-----
<pre>
SQL> select * from v$version;

BANNER
--
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> create public database link test_link connect to username identified by password using 'db';

Database link created.

SQL> drop public database link test_link;

Database link dropped.

SQL> create public database link test_link connect to username identified by 1password using 'db';
create public database link test_link connect to username identified by 1password using 'db'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> create public database link test_link connect to username identified by onepassword using 'db';

Database link created.

SQL> drop public database link test_link;

Database link dropped.

SQL> create public database link test_link connect to username identified by !password using 'db';
create public database link test_link connect to username identified by !password using 'db'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> create public database link test_link connect to username identified by *password using 'db';
create public database link test_link connect to username identified by *password using 'db'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> create public database link test_link connect to username identified by 4password using 'db';
create public database link test_link connect to username identified by 4password using 'db'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

</pre>
-----
the formatting may be a bit screwed above, but the asterisk (*) appears under the number of the password

any ideas?

I would rather not have to change the password on the target, as that will affect the other database that is running just fine, in fact there is a whole group of databases in this situation - I've just glossed over that to simplify the example.

So I have to either:
1. Change the password for the target user to not start with a number (not desirable)
2. Create a new user on the target with the same permissions as the original user and use that


I have tried enclosing the password in quotes but that doesn't work either.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2013
Added on Jul 28 2011
4 comments
4,931 views