Showing posts with label server2000. Show all posts
Showing posts with label server2000. Show all posts

Sunday, March 11, 2012

Connection to SQL server Help SOS

I have SQL Server2000 installed on my PC when I am trying to do some programs in ASP.NET application. I have serious problem working with the SQL server 2000.Whenever I use visual tools to connect to the server or manually. Explorer returns error
//////////////////////////////////////////////////////////////////////////////////////////////
Server Error in '/ASP.NetPage530' Application.

Login failed for user 'ZEUS\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'ZEUS\ASPNET'.

Source Error:

Line 88: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 89: If Not IsPostBack Then
Line 90: SqlDataAdapter1.Fill(DsCustID1, "Customers")
Line 91: DataBind()
Line 92: End If

Source File: C:\Inetpub\wwwroot\ASP.NetPage530\WebForm1.aspx.vb Line: 90

Stack Trace:

[SqlException: Login failed for user 'ZEUS\ASPNET'.]
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
ASP.NetPage530.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\ASP.NetPage530\WebForm1.aspx.vb:90
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
////////////////////////////////////////////////////////////////////////////////////////////////////////
No errors exist when I work with windows application both in ACCESS or SQL SERVER Databases and no errors exists when I am using access files in asp.net applicationand in both cases i use Windows NT Integrated Security .Most probably I need to configure my IIS5.0 but how I have no idea
Can anyone help?You may need to grant 'ZEUS\ASPNET' login permissions to your SQL Server. You can do this directly in SQL Server Enterprise Manager if you have it. Otherwise, you will need to use SQL language by running osql.exe from the command line.|||Yes but in command promt it asks for a password I have only one one pasword is system password which is invalid in command promt for osql.exe how i can configure it ?please help|||Type osql /? at the command line.

This gives you a list of parameters you can use to run the program.

I think you can use the-E parameter for a trusted connection.|||Thank you trying help me but I have no idea how to use –E parameters
I have tried the following command in command prompt osql/E the output was the number 1 what it means I don't know pushing the enter gives 2 and etc
what i have to do to enable trusted connections ???|||
If you are seeing this:

1
That means you are logged in succesfully.

Now you can execute any SQL statement. Each statement can consist of multiple lines. When you are finished, typeGO on a new line and hit enter. For Example (type enter at the end of each line):

1>Select name
2>From sysxlogins
3>go

This will display a list of current logins for your database.

What you need to do next is find some documentation on SQL language on how to add logins and grant them access to databases and database objects.

Have a look here for granting an NT user login permissions:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ga-gz_8dri.asp

If you like, you can go here for security in general:http://msdn.microsoft.com/library/en-us/adminsql/ad_security_05bt.asp?frame=true

I hope this helps.

Saturday, February 25, 2012

connection strings

This is probably a very basic question and I apologise for asking. Can an app developed with VWD using SQLexpress be used with server2000? if so how do I modify the connection string.

hi,

a long as no particular keywords for SQL Server 2005 are used (say, the unsupported "MARS_Connection=yes;", and the like), the connection string is quite similar.. please have a look at http://www.connectionstrings.com/ for samples..

regards

|||Also have a look at the driver, if you install the application on a non SQL System, the SNAC will probably not exist. YOu will either have to ship it within your application, or use a MADC driver which is installed on the most systems.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Sunday, February 19, 2012

Connection string for Remote Database connectivity(SQL Server2000)

hai,

I am working on ASP.NET 2003 with SQLServer2000. My application requires to be connected to the Database which is there in my Headoffice.

My SQLServerName is "MyDBServer\TestDB"

Database Name is "WebTO", UserID="******" and Password="******"

My Remote Server IP Address is "192.168.1.2" and its Static IP is "58.93.61.235"

I have specified the Connection string for my Remote Server as

"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB;UID=******;PWD=******;Database=WebTO"

(or)

"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB,1433;UID=******;PWD=******;Database=WebTO" (1433 is the Port number of the Remote SQLServer)

but it is giving the error " SQL Server does not exist or access denied".

if i execute the same application at my Headoffice (Remote Server) by changing the Connection string as

"Provider=SQLOLEDB.1;Server=192.168.1.2\TestDB;UID=******;PWD=******;Database=WebTO"

then, it is working fine.

Can anyone tell me where i went wrong or what i have to specify in my Connection string so that i can access my Remote Database Server.

Thanks in Advance,

Srinivas.

try

server=192.168.1.2,1433 ................... hope it will work

|||

192.168.1.2,1433 is also not working.

But, i don't know how can we access the Remote Server just by giving the IP without giving it's static IP.

|||

did u try with the static ip

58.93.61.235,1433

|||

My friend it seems that u aren't aware of my previos post where i have clearly mentioned that i have already tested with Static IP, 58.93.61.235,1433 but it is giving the error "SQL Server doesn't exist or access denied".

|||

Hi Srinivas,

have you enabled remote connections on your sql server? one more thing why are you specifying provider=SQLOLEDB?

do take a look at this link >>>>http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html, under the threadhttp://forums.asp.net/t/1118398.aspx

migth be helpful to you

thanks,

satish.

|||

Hi Satish,

Thanks for ur reply.

Remote Connections on my SQL Server option is already in Enabled state. ( "Allow other SQL Servers to connect remotely to this SQL Server using RPC" check box is already in Checked state.)

And Regarding Provider=SQLOLEDB, when i am using OLEDB object, i need to provide the Provider information right?

And the link which u had given is asking to get registered in that site which is not a Free site.

Thank you.

Srinivas.

|||

Hi,

The IP (192.168...) works because you are in LAN. Each machine can be connected with each other and the IP of the remote machine is setting to "192.168..." (You can useipconfig -all to check it in command prompt.) You can't use Query Analyzer to connect the romote database by your static IP neither. So, just assign your machine with your static IP and have a try.

Thanks.

Tuesday, February 14, 2012

Connection String

I am a web database Developer not server Admin
my company use SQL server2000 I use vb.net2003
Last week My web on intranet worked but
Today we have a new server and move the data to another server
my old connection string is "user id=sa;password=;datasource=server1;initail catalog=table1;"
Now I have changed only datasource to "user id=sa;password=;datasource=server2;initail catalog=table1;"
I am not sure about the user id(that the admin told me) because when I test my web it show error message like this
******************
Login failed for user 'sa'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'sa'.
*******************
(and I have tried user ID= blank too)

How can I know the user id of the server (SQL server 2000)?
Thanks for helping me
Have a nice dayTwo things.

First, you give wrong information. Your connectionstrings are not valid. It is NOT spelled "initiail catalog".

Second, what about the SA user? It looks simply like you give the wrong password. That simple. Try entering the correct password. Try resetting the password.|||YEs,I mean "initial catalog"--> not in case 1
the old one worked.I think the problem is only --> I don't know The user ID and password.
For case 2--> I can create and update (edit , delete) the table in SQL database.but I don't know well how to manage the SQL server I am just the user who can design DB and create tables in DB.So now I don't know both of user ID and password.
I think 1.ask the db administrator-->but he's on vacation.
2.Can I know by searching in SQL Enterprise Manager or something like that?
thanks for helping me.
Have a nice day.|||A web database developer huh?

Case 1: owned
Case 2: owned
Case 3: owned

You're using the 'sa' account? That's foul! Create a user specifically for the site, and give it permissions based on the databases and tables you need. Also.. initial catalog isn't a table. It's a database name.|||YEs initial catalog is my db name.The problem is-> I am not admin,I just want USER ID and Password For accessing DB (via my web page).
For the old server I used SA and blank password,I know these from admin but for the new one I don't know both of them I have tried "SA" and PAssword SA or blank oe something like that it show the error message -->Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
or-->Login failed for user 'SA'
so I want to know how can I get the sql user id and password?
(I cannot right click at the server for see the property of the server)

Or I cannot do anything.
Thanks a lot for helping me.
Have a nice day.