VMware Cloud Community
hurdle
Enthusiast
Enthusiast

vCenter 5 install : Could not connect to DB with specified JDBC URL

I am trying to get vCenter 5 installed on  Windows 2008 R2 sever

Sql express 2008 R2 installed

When I try to connect to install it I receive:

Could not connect to database with specified JDBC URL

I also tried to install it attaching to a 2005 express DB with the same error.

Any ideas

20 Replies
cfp2000
Contributor
Contributor

I'm having the same problem.

/Carl-Fredrik http://highball.se http://twitter.com/cape2000
Reply
0 Kudos
AureusStone
Expert
Expert

Is the SQL service started?  Can you connect when you go into the ODBC properties and test connection?  Did you install SQL express before installing vCenter, or did you install it as prompted by the vCenter install.

You could possibly install the management studio software and confirm that you can login.

Reply
0 Kudos
cfp2000
Contributor
Contributor

I fixed it.

I Turned out that I was running SQL Server 2005 RTM. I Downloaded SP4, installed it and boom (the installer works).

https://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7218

🙂

/Carl-Fredrik http://highball.se http://twitter.com/cape2000
Reply
0 Kudos
hurdle
Enthusiast
Enthusiast

I have confirmed I can login via management studio

The SQL instance is running

Test connetion work find

I am trying to use SQL 2008 R2.

If I install vCenter using the option for it to install SQL it works fine.  The problem is I would like to connect using a new database I create on a SAN drive vs the default C:\.  I know I oculd move the DB afterwords, but I rather figure out the issue.

Reply
0 Kudos
cfp2000
Contributor
Contributor

I had the same problem with 2008 R2 without any service packs.

Try patching your SQL Server.

/Carl-Fredrik http://highball.se http://twitter.com/cape2000
Reply
0 Kudos
rechrobert
Contributor
Contributor

I had the same issue but I had already installed all SQL 2008 R2 updates.  I was able to resolve this issue by restarting the SQL services.  

Grafzahl
Contributor
Contributor

I had the same issue. Installed latest MS SQL 2008 R2 Express SP1 (CU1-6), created the databases and DSNs and startet vCenter Server 5.0 installation. After selecting the DSN i got:

"JDBC connectivity to the database using the generated JDBC URL failed."

I solved the problem as follows:

- run SQL Server Configuration Manager (part of SQL Server Management Studio)

> SQL Server Network Configuration > Protocols for <INSTANCE> > TCP/IP > Right-click and "Enable"

Then restart SQL services and start vCenter Server 5.0 installation and choose your configured DSNs.
Reply
0 Kudos
itdoug
Contributor
Contributor

a simple service restart fixed it for me.

Reply
0 Kudos
pikas
Contributor
Contributor

Running SQL 2008 R2 on Win 2008 R2.

Restarting SQL server services fixed it.

Reply
0 Kudos
johnjcousens
Contributor
Contributor

I had the same issue, and found a completely unexpected fix / bug in the installer.

I followed the following kb articles suggestions to modify TCP SQL connections and installing the JDBC driver for SQL with no success

Upgrading to vCenter Server 5.0 fails with the error: Could not connect to DataBase with specified JDBC URL

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200730...

Upgrading to vCenter Server 5.0 fails with the error: JDBC Connectivity to the database using the generated JDBC URL failed

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200664...

I finally tried installing with just a completely different admin account with success.  That lead me to believe it was a password issue.  So, I tried the install again with the original SQL account with a simpler password.  Success.

Just as a note.  My account originally had a password similiar to this: \/mwareblah123 (The first V is actually "\" + "/") (Failed with JDBC URL error)

                        After resetting the password to simply vmwareblah123 (Success)

Hopefully someone at VMware is aware of this bug.  Limitting the complexity of a SQL password for an installer is a bit lame Smiley Happy

Reply
0 Kudos
johnjcousens
Contributor
Contributor

As a note, this only seems to happen when using SQL authentication for your db_owner account.  If you use windows authentication, there is no limit on the password complexity.  I wonder if this is just a SQL limitation.  I tried the same with both SQL 2008 R2 and SQL 2012.  Both have the same issue with SQL auth.

Reply
0 Kudos
3taggarts
Contributor
Contributor

Hi All,

I am in no way a DBA and to be honest this is the first time ever dealing with SQL 2012. I've chosen for future reasons to install an independant copy of SQL Server 2012 rather than installing the 2008 R2 version that comes with Vcenter. Yes I know this is a bigger headache but I'd rather do this the hard way to learn more.

Obviously this Vcenter installation has been frought with endless errors and late nights scouring forums for answers.

So as this SQL server 2012 is a seperate install I managed to solve the DSN problem and then not surprisingly two steps later I get another headache.....

"Please enter the JDBC URL for the VCenter server Database". When I got to this section the field was already blank and again left stumped even after checking the many possibilities of where I'm supposed to point this.

Can someone please help me fill in the gaps....

jdbc:sqlserver://host;databaseName=database

My FQDN or host name for my machine is: SQLServer2012@domain.co.uk

My SQL Server 2012 database name: SQLServer2012

DSN name: Vcenter

I have no idea what "=database" is.

If I'm completely running down a wrong path any help would be appreciated 🙂

Thanks

Reply
0 Kudos
Atreidae
Contributor
Contributor

Just for anyone else googling the issue and coming across this thread

Just installed fine with SQL Express 2012 SP1, but same thing. Needed to restart the SQL service before the installer could authenticate. Note, the ODBC connection works fine before the restart so don't be fooled.

Reply
0 Kudos
admin
Immortal
Immortal

Cause

This issue occurs if the SQL user has a blank password or if TCP/IP is disabled in the SQL Server instance.

Resolution

To resolve this issue, create an SQL user password.

To create a SQL user password:

  1. Connect to the SQL server
  2. Expand Logins from the server Security tree
  3. Right-click the VCDB user, select Properties
  4. Enter in a password for the selected user
  5. Click OK

If this does not resolve the issue, enable TCP/IP in the SQL Server instance. 

To enable TCP/IP in the SQL Server instance:

  1. Connect to the remote SQL Server.
  2. Run SQL Server Configuration Manager that is a part of SQL Server Management Studio.
  3. Expand SQL Server Network Configuration > Protocols for INSTANCE.

    where INSTANCE is the database instance name provided when creating the database.

  4. In the right pane, right-click TCP/IP and click Enable.
  5. Restart SQL services.

VMware also recommends that you check that the SQL server's IP address is enabled and active. To check the IP address, go to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for MSSQLSERVER > TCP/IP Properties > IP Addresses.

Reply
0 Kudos
Daniel_Vieceli1
Contributor
Contributor

I Have some problem in SQL Server 2012,

I rebooted the server and tried to install VCenter and worked.

Reply
0 Kudos
Browlin
Enthusiast
Enthusiast

i also had same problem .

please check with  firewall or group policy is enabled on that server ?

Reply
0 Kudos
Atul_gen
Enthusiast
Enthusiast

As you are using Express DB so that machine might be not using dynamic port.Try JDBC url with the below format.

jdbc:sqlserver://host;instanceName=instance;databaseName=database

Here Host:IP address or Hostname

Instance Name :By default it is MSSQLSERVER.

Database Name:Your db name.

We use this URL if we are not sure about Port no of sql server so we provide instance name.

I hope it will help you.

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
cskocsis67
Contributor
Contributor

Hi all,

I tried with a lot of different configuration.

When I turned off Shared memory as client connection method it worked fine.

TCP/IP was first in client connection order.

Reply
0 Kudos
slanc557
Contributor
Contributor

Turns out the solution was to use a sql account to authenticate.

When you make the ODBC DSN, use the sa account (or another sql account with access to the database), not windows

When you run the vcenter upgrade, put in the sa account username and password for the database username and password.

The jdbc url is going to be

jdbc:sqlserver://host;databaseName=database

so if it has intergratedSecurity=true in there, get rid of it

Reply
0 Kudos