Skip to main content

Query resulting in syntax error

  • July 4, 2019
  • 1 reply
  • 1 view

hsingh

Requesting for help here as I am getting following error when executing the following query:

ALTER DATABASE abc SET PARAMETER LDAPLinkURL='ldap://172.16.239.9', LDAPLinkSearchBase='CN=Users,DC=demo,DC=local',LDAPLinkBindDN='CN=ADVertica,CN=Users,DC=demo,DC=local';

ERROR 4856: Syntax error at or near "ALTER DATABASE" at character 1
LINE 1: ALTER DATABASE abc SET PARAMETER LDAPLinkURL='ldap:/...

1 reply

marcothesane
Forum|alt.badge.img+1
  • Participating Frequently
  • July 4, 2019

Can you try to fire the statement just from the command line?

From a Linux / Windows prompt where you have vsql, go:

vsql -c "ALTER DATABASE abc \
SET PARAMETER \
LDAPLinkURL='ldap://172.16.239.9', \
LDAPLinkSearchBase='CN=Users,DC=demo,DC=local', \
LDAPLinkBindDN='CN=ADVertica, \
CN=Users, \
DC=demo, \
DC=local'" 

When I do that (my database has a different name, and I don't want to change the LDAP settings), I get:

ROLLBACK 2983:  Database "abc" does not exist

That error message comes from the Analyzer; this means that the parser and syntax check has been successful. So it shoujld work like this for you ...

Good luck