Showing posts with label sqlserver2000. Show all posts
Showing posts with label sqlserver2000. Show all posts

Friday, March 30, 2012

how can i connect with lank password

hi all
i setup my sqlserver2000 on win 2000 and let him to take username and password from windows
so how can i connect to it with blank uid,pwd?
thanxYou can use trusted connection as :
"Server=Aron1;Database=pubs;Trusted_Connection=True;"

FYI: http://www.connectionstrings.com

Regards,|||thanx alot|||hello aain
i tried to connect but an eror msg appears:
Exception Occurred: Login failed for user 'COMPU-DSW51C8DZ\ASPNET'.

i'm using this code:

SqlConnection cn;
SqlCommand cm;
String strSQL;

cn = new SqlConnection ("server=localhost;database=Northwind;Trusted_Connection=true;");
strSQL = "INSERT INTO Employees " +
"(EmployeeID,FirstName,LastName,City) " +
"VALUES ('" + txtID.Text + "', '" +
txtFirstName.Text + "', '" +
txtLastName.Text + "', '" +
ChkToInt(chkCity) + "')";

cm = new SqlCommand(strSQL, cn);

// ** Open connection
try
{
cn.Open();
// ** Execute command
cm.ExecuteNonQuery();
}
catch(SqlException sx)
{
Response.Write("Exception Occurred: " + sx.Message);
}
finally
{
if (cn.State == ConnectionState.Open)
cn.Close();
}|||This means you need to set up COMPU-DSW51C8DZ\ASPNET as a login in SQL Server.

Do you have Query Analyzer? Running this will create the login:

exec sp_grantlogin 'COMPU-DSW51C8DZ\ASPNET'

And running this will give permission to the database:
exec sp_grantdbaccess 'COMPU-DSW51C8DZ\ASPNET'

Make sure that northwind is the current database before running executing sp_grantdbaccess.

Terri

How can i connect to Sqlserver2000 from sqlserver2005

Hi,

Can any1 tell me how to connect to Sqlserver2000 from sqlserver2005 ...I cant see sqlserver2000 instance name when i try to search in database engine

With regards

mahender

I assume you're talking about using SSMS and you can't see your sql2k instance?

When you click "browse" button, the application send a broadcast onto the network on UDP 1434 to get a list of available sql instances from sqlbrowsers. If the sqlbrowser port is blocked or it's not running on the node where your sql2k instance resides, you would not get a reply back. This does not mean, however, that you cannot connect to your instance. If this is a default instance, you can just specify the servername explicitly and the application (ssms) should connect. If it is a named instance, you will need to specify the listening tcp port (e.g. servername,12345) to connect (this assumes your sqlbrowser is not running).

If you're talking about creating a connection between the two servers, you will want to look for "sp_addlinkedserver" in book online. There should be detailed info to walk you through.