March 4, 2010 at 6:39 am
hi all,
i want to access sql server database from lan ..i enable the tcp/ip and browser but when i open the connection i got an exception error 0 etc and error 40.
can please any one help me .
my connection string is as like.
SqlConnection connect = new SqlConnection();
connect.ConnectionString = "server=192.168.1.4,1433; Integrated Security=True; Initial Catalog=GYM; User ID=Genentech; Password=123";
try
{
connect.Open();
MessageBox.Show("open");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
March 4, 2010 at 7:36 am
To diagnose the root cause when a client is attempting to connect and receives error 18456 with a error description of "Login failed for user '<user_name>'. (Microsoft SQL Server, Error: 18456)", the exact reason for the error is not returned to the client but must be obtained from the SQL Server error log file on the server. Search the ERRORLOG for this text string "Logon Error: 18456, Severity:" such as:
YYYY-MM-DD HH:MM:SS.nn Logon Error: 18456, Severity: 14, State: ??.
YYYY-MM-DD HH:MM:SS.n Logon Login failed for user 'SqlLogin'. [CLIENT: xxx.xxx.xxx.xxx]
For the state code shown as ??, use the below to determine the root cause:
STATE DESCRIPTION
1 SQL Server configured to only allow sysadmins to connect.
2,5 Invalid login name
3 Maximum SQL Server connections exceeded.
6 Attempt to use a Windows login name with SQL Authentication
7 Login disabled and password invalid
8 Password mismatch
9 Invalid password
10 SQL Server service account locked out in Active Directory.
11 Attempting to connect with a Windows account which is not defined as a SQL Server Login
12 Attempting to connect with a SQL acount which is not defined as a SQL Server Login
13 SQL Server service paused.
16 Default or requested database not available.
18 Password change required in Active Directory.
23 SQL Server shutdown in progress.
27 Requested database does not exist.
Database not available means that a database of the requested name does exists but is not accessable due to being any of offline, suspect, recovering, single user mode, or db owner only mode.
SQL = Scarcely Qualifies as a Language
March 4, 2010 at 7:44 am
done only error was ..i have not open the port on firewall.:-)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy