matlab database
Mostra commenti meno recenti
Hi, Hello, I'm trying to connect to a database using Microsoft SQL Server 2008 but i don't understand how to use the function database:
conn = database('dta_rockers','dta','dtarocks', ... 'com.microsoft.sqlserver.jdbc.SQLServerDriver', ... 'jdbc:sqlserver://kadakiak:1433;database=dta_rockers')
This is the example i find in the user's guide in order to connect with Microsoft SQL server 2005 ( and I think is right also for 2008 version). I don't have any password or user so:
>> conn=database('Mare_Taranto','','','com.microsoft.sqlserver.jdbc.SQLServerDriver','jdbc:sqlserver://PAOLO-PC:fe80::c7c:6b4b:cb79:2ac3%14;database=Mare_Taranto')
PAOLO-PC is my server name, where can I find the port address of server? Do I make other mistake?
Thank you!
Risposte (3)
Kaustubha Govind
il 8 Lug 2011
0 voti
Are you using a JDBC driver? If you do not have a username and password, it is likely that your database uses Windows authentication. See How can I access a SQL Server database with a JDBC driver if I have Windows Authentication using Database Toolbox?
You are not using the port number of the server (Not sure what fe80::c7c:6b4b:cb79:2ac3%14 is). Contact your system administrator to find the URL of your database server. If you have configured the server yourself, you should be able to find out how to figure this out by a web search. The default port number for SQL Server is 1433 I believe.
Oleg Komarov
il 8 Lug 2011
0 voti
You can also use the wrapper I wrote, it should be clearer how to connect to MS SQL Server: http://www.mathworks.com/matlabcentral/fileexchange/25577-ms-sql-jdbc-connection
Paolo
il 8 Lug 2011
2 Commenti
Oleg Komarov
il 8 Lug 2011
Did you follow the steps in my link? It doesn't contain just the page with my submission (which automatically handles win authentication) but it also sheds ligth on the jdbc driver and how to "install" it.
Paolo
il 10 Lug 2011
Categorie
Scopri di più su Database Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!