Re: problem in connecting sql server



"arsh_e_maah" <arsh_e_maah@xxxxxxxxx> wrote in
news:1114376037.207388.258080@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

> hello
> i am new to sql server and .net programing here is a problem i got
> while trying to connect sql server over internet
>
> Dim conect As New SqlConnection("data source =202.154.228.184;net =
> 'dbmssocn';database = pmec ; user id = sa;password = sa ")
> but the following exception is thrown
>
> "sql server does not exists or access denied"
>
> kindly help me solve this problem, i need to solve it badly
> thanks
>

It is a programming question. You say you're coming over the Internet. Is
the SQL Server behind a firewall? If this is true, the SQL Server port
must be open on the FW. That's port 1433 and 1434 may come into play too.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q287932

If there is a router setting there, then port forwarding on the router
must be used to forward the ports to the IP/machine that needs the ports
open.

In addition, you should supplement the protection of the machine with
IPsec to further protect the SQL Server.

http://www.petri.co.il/block_ping_traffic_with_ipsec.htm
http://www.analogx.com/contents/articles/ipsec.htm

You may also want to change the user-id and psw and not use the SA since
everyone else in the world knows this and can attack Sql Server.

You should set up a generic user-id and psw and give ths user-id the
appropriate rights to access the database. In addition, change the SA psw
to something else.

You should think about applying the SQL Server security updates from M$
if you have not done so.

HTH

Duane :)

.



Relevant Pages

  • Re: ADP problems after SQL 2005 Upgrade
    ... Use the SQL Server Configuration Manager to create aliases; ... each port can be associated only with a single instance. ... Sylvain Lafontaine, ing. ...
    (microsoft.public.access.adp.sqlserver)
  • [NT] Microsoft SQL Server 2000 Unauthenticated System Compromise
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Microsoft's database server SQL Server 2000 exhibits two buffer-overrun ... clients connecting to TCP port 1433 or both. ... This message is a single byte packet, ...
    (Securiteam)
  • Re: Do SqlServer 2000 & SqlServer 2005 co-exist
    ... Either SQL Server 2000 or SQL Server 2005. ... So you have to move one of them to another port. ... You could allow an program exception in your firewall instead of a port number exception. ... I understand that you can connect to SQL 2000 named instance on the local ...
    (microsoft.public.sqlserver.setup)
  • Re: IIS, SQL 2000 & XPs Firewall
    ... Only one instance of SQL Server can use TCP port 1434. ... You may find it easier to use SQL Server Configuration Manager ... 2008 will be a named instance ... you will have to open those as exceptions in the firewall. ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL 200 Dev edition on workgroup will not connect
    ... I have been using sql server for about 8 years but mainly working with sql 2000. ... know your experience level with SQL Server and yes, sometimes things being messy but letting a SQL Server instance to accept remote connections and uninstalling it are generally straightforward tasks to perform. ... I suggest you to check for the dynamic port number that your SQL Server graps. ... Write down the port number in the "TCP Dynamic Ports" property and then run a Command Prompt and see if this port is bening listened. ...
    (microsoft.public.sqlserver.connect)