Wednesday, December 2, 2009

Best Dvd Upconverting Bluray Player

Netbeans Connecting with SQL Server and JDBC - Part 1

Dibujo This first tutorial will attempt to show the adjustments that must be done in sql server 2005 to connect it to netbeans, so we will need some tools and pubs database previously downloaded and attached to our SQL, but you have the pubs database, you can look at this post or you can use any database you have.

I. - Conditions
  • Microsoft SQL Server 2005.
  • Microsoft SQL Server JDBC Driver, and if not you can download it here . NetBeans IDE
II .- OBSERVATIONS
  • By default, the SQL Server 2005 does not allow connections remote and the sa account is disabled, so if we try to connect displays the following error message:
  • Another problem can arise when we wish to connect is that TCP / IP connections are disabled, for which the deal to connect us to display the following exception:

    Network error IOException: Connection refused: connec

III .- SQL SERVER SETTING THE STEP BY STEP
  1. ENABLE TCP / IP : We
    • the Start menu → Programs → Microsoft SQL Server 2005 Configuration → Tools → SQL Server Configuration Manager: image
    • The left side of the window of the SQL Server Configuration Manager, we will expand the choice Network Configuration SQL Server 2005, click Protocols for SQLEXPRESS and we right click on TCP / IP and choose the option to enable (by doing this will get a warning that changes will not take effect until you restart the service ) image
    • Now go to the TCP / IP and headed IP Address tab → IPALL and change the dynamic port value for the value of 1433 (this value is necessary when trying to connect with netbeans) ; again to accept the warning we will restart for the changes to take effect: image
    • Now we will restart the service, for this we go to the left pane click the option → Services → SQL Server 2005 and go to the right pane in SQLEXPRESS and we restart: image image image
  2. ENABLING CONNECTION DUAL MODE : SQL SERVER AUTHENTICATION AND WINDOWS AUTENTICCIÓN Login
    • SQL Server Management Studio 2005 in Windows Authentication mode: image
    • In Explorer, right-click the instance name and select properties. image
    • Select the Security tab and change the authentication mode from Windows to Windows Authentication Mode and SQL Serv er image
    • Then we will get a warning which indicates that the changes will take effect when s restart SQL Server (this we will do later.) image
    • We're going to the instance and restart: image
  3. ENABLE REMOTE CONNECTION TO THE SURFACE CONFIGURATION :
    • Open
    • surface configuration is SQL Server 2005 image
    • Select Surface Area Configuration for Services and Connections: image
    • expanded the instance of SQLEXPRESS → Engine → Database Connection remote and select (on the right side): Local and remote connections → Using TCP / IP and named pipes: image
    • Services In the tab, change the startup type to Automatic and we to accept (again we will get a warning that indicates that you have to restart the service): image
    • SQL Server Log Management Studio 2005 in Windows Authentication mode.
    • In the right pane, go to Security → Login and user sa look right click → Properties: image
    • In the properties we enter a password for this user and the status tab give permits connection database and log on: image image
    • Now we can only restart the service for the changes to be made: image

duke NOTE: If trying to restart the SQL Server service error occurs is because you must enter administrator mode, and for this we click icon in the SQL server → Run as administrator.

image

Well here we have already given permission to user "sa" for remote connection can be made using the dual boot is twice Login:

image

image

0 comments:

Post a Comment