I developed a DotNet program using SQL Server as the backend. I
developed on a machine (XP) which was part of an AD network and also
contained SQL Developer. Everything worked OK.
Then I deployed the DotNet program to another machine (XP) and
installed SQL Server on that machine. It too was a member of the AD
network. Everything worked OK again.
Finally I disconnected the second machine from the network and logged
on as a local user, not against the network. When I fire up my program
and access the DB, I get the following error message:
System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.
GetPooledConnection(SqlConnectionString options,
Boolean& isInTransaction)
at System.Data.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection
connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter..FillFromCommand(
Object data, Int32 startRecord, Int32 maxRecords,
String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter..Fill(
DataSet dataSet, Int32 startRecord, Int32 maxRecords,
String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Prog.SysMaint.SysMaint_Load(Object sender,
EventArgs e)
I don't understand this. As this same user I can launch and use EM and
Query Analyzer. What is the problem?
Thanks, LarsHi Larzeb,
Thanks for your posting!
From your descriptions, I understood your scenario as below
1. In your development machine, you have SQL Server installed and your
application works fine
2. When you transfer the application to another machine, even you have
create SQL Server, it seems your application does not find the SQL Server
instance.
3. Before you disconnect the second machine from network, will this
application works fine?
Have I understood you? Correct me if I was wrong.
Based on my experience, it seems that your application does not recorgnize
the new SQL Server instance directly. I would like narrow down this issue
by following questions.
1. Make sure your new SQL Server is started
- Start -> Run -> "net start mssqlserver" (in case you are using default
SQL Server instance)
2. What Authentication you are using in your application, Windows
Authentication or SQL Authentication?
3. How do you arrange your application to access SQL Server? Which SQL
Server you have specified your application to connect? If your application
throw out the error message only when it was disconnected from network, I
am afraid it was still connect to the first machine when deployed to second
machine. You will have to modify your conntection strings.
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael,
After tranferring to a new machine and the machine was connected to
the network, it operated correctly.
After disconnecting, I made sure that the local SQL services were
started. When launching either EM or SQL Analyzer, the name of the
instance is (local).
I am using Windows Authentication. The logged-on user belongs to the
local Administrator's Group.
The connection string is:
"Data Source=(local);Initial Catalog=AppName;Integrated Security=SSPI"
Thanks, Larzeb
On Tue, 01 Feb 2005 07:12:26 GMT, v-mingqc@.online.microsoft.com
(Michael Cheng [MSFT]) wrote:
>Hi Larzeb,
>Thanks for your posting!
>From your descriptions, I understood your scenario as below
> 1. In your development machine, you have SQL Server installed and your
>application works fine
> 2. When you transfer the application to another machine, even you have
>create SQL Server, it seems your application does not find the SQL Server
>instance.
> 3. Before you disconnect the second machine from network, will this
>application works fine?
>Have I understood you? Correct me if I was wrong.
>Based on my experience, it seems that your application does not recorgnize
>the new SQL Server instance directly. I would like narrow down this issue
>by following questions.
>1. Make sure your new SQL Server is started
> - Start -> Run -> "net start mssqlserver" (in case you are using default
>SQL Server instance)
>2. What Authentication you are using in your application, Windows
>Authentication or SQL Authentication?
>3. How do you arrange your application to access SQL Server? Which SQL
>Server you have specified your application to connect? If your application
>throw out the error message only when it was disconnected from network, I
>am afraid it was still connect to the first machine when deployed to second
>machine. You will have to modify your conntection strings.
>Thank you for your patience and corporation. If you have any questions or
>concerns, don't hesitate to let me know. We are always here to be of
>assistance!
>
>Sincerely yours,
>Michael Cheng
>Microsoft Online Partner Support
>When responding to posts, please "Reply to Group" via your newsreader so
>that others may learn and benefit from your issue.
> ========================================
=============
>This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Larzeb,
First of all, please make sure tcp/ip and name pipes are enabled by using
client and server network utility.
And then ,please follow the steps below and let me know the results
1. connect the LAN, use Profiler to trace which SQL Server instance was
connected by the application. (Please trace your development machine and
this new machine at the same time to see where this application is
connecting)
2. disconnect the LAN, use the Profiler to trace SQL Server again to see
whether it will be the same as first scenario.
You are also welcome to send the these two trc files to me directly
v-mingqc@.microsoft.com if you need me to pick up the difference between them
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment