1

I am trying to connect to SQL server from iccube Web UI, but when I set up the Data Source connection like this

Name: TestDataBase
DriverType: SQL Server
ServerName: localhost
DB Name: TestDataBase

User: MyWindowsUserName
Password: ********** 

(my windows username and password).

, I got the following error:

JDBC connection for url 'jdbc:sqlserver://localhost:1433;databaseName=TestDataBase;' and user 'MyWindowsUsername' cannot be created due to error 'Login failed for user 'MyWindowsUsername'.

What am I missing, and can I somehow use integratedSecurity so I can login with my windows credentials as I do from SQL Server Management studio.

vldmrrdjcc
  • 2,082
  • 5
  • 22
  • 41
  • I have just managed to log in with SQL Server Authentication, just don't know if I can log in with Windows credentials. – vldmrrdjcc Oct 03 '18 at 13:14

2 Answers2

1

Try jdbc:sqlserver://localhost:1433;databaseName=TestDataBase;integratedSecurity=true;

Hermes
  • 33
  • 5
  • I wanted to do exactly that, but in this screen where I am putting this connection parameters, there is no option to enter or check integrated security. I have a problem with uploading picture of that screen, but I do not see that option. – vldmrrdjcc Oct 03 '18 at 13:42
1

You can try to setup the connection string as mentionned by Hermes (or here) using the "Server Name" and "DB Name" to define the actual JDBC class name and connection string (check the help icons closed to each fields):

enter image description here

Hope that helps.

Marc Polizzi
  • 9,275
  • 3
  • 36
  • 61
  • I made a progress, populated fields like on your picture but now I am getting an error: Failed to load tables from data source 'SQL Server' due to the following error: 'Database 'true' does not exist. Make sure that the name is entered correctly.' – vldmrrdjcc Oct 04 '18 at 13:08
  • After a while it turned out that it is order of connection parameters: with this connection string I succeded: jdbc:sqlserver://localhost;integratedSecurity=true;databaseName=TestDatabase - so databaseName must be in the last place, and it must not have ; at the end because it will be considered as a part of database name. So, thank you very much on your help! – vldmrrdjcc Oct 04 '18 at 13:53