sql-serverdatabasesql-server-2008database-installation

What setting has to be done to connect with database with this connection string given below?


In my .exe setup having connection string

Data Source=SERVER;Initial Catalog=POS_Chimur;User ID=sa;Integrated security=false

I have to install database for this exe what settings will be needed according to above connectionString.

Till now I have installed sql server with default instance with name of pc SERVER. Still i am unable to connect with above connection string.


Solution

  • I see two things mainly:

    1. You are connecting with SQL Server login

      • Go to SQL Server Management studio
      • Connect to the database server with administrative account you know and that works
      • right mouse click on the server in the 'Object Explorer' window
      • choose security
      • In the Server authentication group, choose 'SQL Server and Windows Authentication mode'
      • Restart SQL Server
    2. This account is sa and doesn't have a password

      • Go to SQL Server Management studio
      • connect to the database server with administrative account you know and that works
      • unfold the server object [-]
      • unfold the Security folder [-]
      • unfold the Logins folder => find sa login
      • right click on it and click Properties
      • In General section uncheck the Enforce password policy checkbox and clean the passwords in both text boxes
      • In Status section, make sure that Login is Enabled and that the Permissions to connect is set to Grant
      • click Ok
      • confirm, that you want to create a login with blank password (which is obviously always a risk)

    After performing those steps, please log out, and try to log in again, but change the Authentication drop down value to 'SQL Server Authentication' and try to login with sa and empty password, if it works, then the connection string should be fine too.