How to solve DB connection Error In Win 7

Results 1 to 6 of 6
  1. #1
    Member xrevoltado is offline
    MemberRank
    Jan 2011 Join Date
    57Posts

    How to solve DB connection Error In Win 7





    Pls i need for help fast


  2. #2
    Proficient Member walkernight88 is offline
    MemberRank
    Aug 2008 Join Date
    /etc/cabal/dataLocation
    192Posts

    Re: How to solve DB connection Error In Win 7

    •Make sure that MSSQL is configured properly.
    •Make sure you are using the right username/password/Windows IP.
    •Disable you windows firewall.
    •Disable UAC (User account control - something like that) in Win7 control panel.

  3. #3
    Member xrevoltado is offline
    MemberRank
    Jan 2011 Join Date
    57Posts

    Re: How to solve DB connection Error In Win 7

    • My MSSQL is configured correctly.
    • Yes , i used the correctly username/password/Windows IP.

  4. #4
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: How to solve DB connection Error In Win 7

    Can centos ping windows? You should also be able to type "telnet <windows IP> 1433" and see the screen go black connect success).

    http://mrmagoo.psiblade.net/sqltest.7z

    Extract to the /root/ folder on centos (chmod 0777) and type:

    /root/test_sql.sh

    This will ask for your SQL server IP and password and then try connecting via Caba's DSN. You should see 1 row of letters and numbers returned if it is successful.

    Run the whole query below on any database and post the results. If this comes back ok then the problem is your networking (vmware) configuration (NAT or Bridged used the wrong way around).
    Code:
    Declare @insname varchar(25)
    if convert(varchar(25),serverproperty('instancename')) is null
      set @insname='MSSQLSERVER'
    else
      set @insname=convert(varchar(25),serverproperty('instancename'))
      select @insname as 'Instance',
      serverproperty('productversion') as 'Ver', serverproperty('productlevel') as 'SP',
      serverproperty('edition') as 'Edition'
      if @insname<>'MSSQLSERVER'
      begin
        select 'THIS IS BAD! You must reinstall MSSQL. Please follow the guides next time.' as 'MSSQL is a named instance!'
      end
    
      begin
        Declare @inspath varchar(10),@reg varchar(100),@tcpremote as int
        EXEC master.dbo.xp_regread @rootkey='HKEY_LOCAL_MACHINE',
        @key='Software\Microsoft\Microsoft SQL Server\Instance Names\SQL\',
        @value_name=@insname,
        @value=@inspath OUTPUT
        set @reg='Software\Microsoft\Microsoft SQL Server\' + @inspath + '\MSSQLSERVER\SuperSocketNetLib\tcp\'
        EXEC master.dbo.xp_regread @rootkey='HKEY_LOCAL_MACHINE',
        @key=@reg,
        @value_name='Enabled',
        @value=@tcpremote OUTPUT
        select @inspath as 'Instance path',@tcpremote as 'Remote connections enabled?'
        if @tcpremote='0'
          begin
            EXEC master.dbo.xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
            @key=@reg, @value_name='Enabled', @type='REG_DWORD',@value=1
            select 'I enabled remote connections ! Please reboot !' as 'Remote connections checker'
          end
        else
          begin
            select 'This is good! I have nothing to do :(' as 'Remote connections checker'
          end
        select account.dbo.fn_md5('test') as 'xp_md5.dll check'
      end
    I should also point out that getting errors about war results is normal unless you actually have some!

  5. #5
    Member xrevoltado is offline
    MemberRank
    Jan 2011 Join Date
    57Posts

    Re: How to solve DB connection Error In Win 7

    Error in /root/test_sql.sh command:



    please have a solution?
    This it's the problem ?
    Last edited by chumpywumpy; 16-02-11 at 11:01 PM. Reason: Fixed

  6. #6
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: How to solve DB connection Error In Win 7

    Centos cannot connect to SQL. Can you ping from centos to windows? Check your vmware networking settings against my guides at mediafire.com/chumpy.



Advertisement