• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC SQL Server 2008 Express Vista and XP

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I'm having a time with SQL Server 2008. If only they'd let me use MySQL

So, using the example right from Microsoft http://msdn.microsoft.com/en-us/library/aa342339.aspx , I have tried to get a sample database "s" to connect.

I know that it works on my machine because I'm running SQL Server Management Studio and that's where I created the database "s".

When I log into SQL Server Management Studio, I do something like this:

Server name: SomeServerName
Authentication: Windows Authentication
User name: (not enabled) computerName\name
Password: (not enabled) nothing_just_whitespace

So, with that, I try to connect using JDBC by using the following connection string:



In which case, I get



NOTES:
- I've tried it without "Windows Authentication" but with a user and have also left both out. Neither case works.

Again, I appreciate your help.

Claude
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll have to configure the SQL Server so that it accepts TCP/IP connections. Make sure you know what port it's listening at, 2008 might decide to use a different port than 1433 (I have no idea whether it does or not). Configure a user ID and password for the database you want to connect to (also in the server) and use that user ID and password in your connection URL. Review the documentation to make sure your connection URL is formatted correctly.
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well the userName and password you have given are incorrect.

And better you use "SQL Server Authentication" mode when you are connecting through java.
but for that you need to enable TCP/IP Connection type.
For doing that, go to SQL Server Surface area configuration > Surface area configuration for Services And Connections > $Your_DB_Instance > Database Engine >Remote Connections

For understanding the differences between these two types please refer this

Use username sa and password which you have given at the time of instance creation. Please note that you can also reset the password for "sa" through windows authentication mode. So not a problem if you dont know the password.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Someone gave me a MySql dump text file and I am trying to recreate the database in question on a different machine.

I installed MySql 5.1.44-winx64 on the machine. It is a brand new installation.

When I execute the command
mysql -u root -p {path}\create_database.sql

I get this output:
Enter password:<password is entered>
ERROR 1049 (42000): Unknown '{path}\create_database.sql'

Do I have to create the database first to recreate it?
I don't know anything about the source database.

What is the correct procedure for restoring a new database onto a machine with NO databases on it?

Thanks in advance.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chaitanya.

This thread is related to a Microsoft Sql Server problem.
You will have a better chance to get help if you create an new thread for your MySQL issue.

Regards, Jan
 
reply
    Bookmark Topic Watch Topic
  • New Topic