Showing posts with label sp1. Show all posts
Showing posts with label sp1. Show all posts

Thursday, March 22, 2012

Can not connect to SQL Server

I installed SQL Server 2005 (server and client components) on Windows Server 2003 with SP1. I can connect to this sql server from any other machine. However, I can not connect from this machine to sql servers on other machines. I have tried named pipe and TCP/IP. Neither of them works. The error message is can not establish connection. Any suggestion?

Thanks,

What is the exact error message ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Here is the error message:

An error has occured while establishing a connection to server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Cound not open a connection to SQL Server) (Microsoft SQL Server, Error 53)

Had enabled the remote connection from other server and can connect that server from other machines.

Thanks,

|||Is a firewall (Perhaps the WIndows default one) installed and configured on the server ? Perhaps then outgoing traffic on the ports is restricted.

-Jens.|||

Also, if you're connecting to a named instance, make sure that you're either specifying the port number in the connection string or you have SQL Browser running on the server machine.

Thanks,
Il-Sung.

Can not connect to AS 2005 from Excel

I'm having issues connecting to AS 2005 sp1 from Excel 2003. I have tried
two configurations as follows:

Secario 1
Installed on a Windows Server 2003 is AS 2005 sp1.
Installed on a workstation with XP sp2 is Office 2003, msxml parser 6.0, SQL
Server AS ADOMD, Excel Add-in for SQL Server Analysis Services sp1.

Secario 2
Installed all on workstation with XP sp2: Full install of SQL Server 2005
Dev Edition, Office 2003, msxml parser 6.0, SQL Server AS ADOMD, Excel
Add-in for SQL Server Analysis Services sp1.

In both cases the error returned is server does not exist or is too busy.

The cube is created and can be browsed from BI Studio.
The LAN id has been added to the AS 2005 security.
All SQL Services are started including Browser and AS.
Firewalls are not enabled.
Local and remote clients are allowed to connect to AS.
I can open TCP port 2383 with telnet on the AS server from the workstation.

Any one see anything I've missed or can shed some light on why the server is
not allowing connections?

Thanks,
Danny

Make sure you install "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " on you client machine

You can get it from http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||I think this gets installed with SQL 2005 locally but I reinstalled it. Unfortunately this had no impact and the error message is the same.|||

Take a look at this post: http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

In addition: Another way to test connectivity:

1. Create new empty text file.
2. Change it's extension to .udl
3. Double click on the file, and in the "Data Link Properties" dialog go to the "Provider" tab. Select there "Microsoft OLE DB Provider for Analysis Services 9.0" then "Next".
4 On the connection page type name of your server and select "Use Windows NT integrated security"

At this point you should be able to list of databases on Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||Thanks Edward. It succeeded on the Test connection and the initial catalog select list populated with the SSAS database names. Looks like the server is responding and the OLE DB driver for AS 9.0 is working. That narrows the issue down to MSExcel 2003 and/or the Addin.|||Issue somehow resolved itself after perfroming a repair on Excel following by reregistering the OLEDB 9.0 dll.

Can not connect to AS 2005 from Excel

I'm having issues connecting to AS 2005 sp1 from Excel 2003. I have tried
two configurations as follows:

Secario 1
Installed on a Windows Server 2003 is AS 2005 sp1.
Installed on a workstation with XP sp2 is Office 2003, msxml parser 6.0, SQL
Server AS ADOMD, Excel Add-in for SQL Server Analysis Services sp1.

Secario 2
Installed all on workstation with XP sp2: Full install of SQL Server 2005
Dev Edition, Office 2003, msxml parser 6.0, SQL Server AS ADOMD, Excel
Add-in for SQL Server Analysis Services sp1.

In both cases the error returned is server does not exist or is too busy.

The cube is created and can be browsed from BI Studio.
The LAN id has been added to the AS 2005 security.
All SQL Services are started including Browser and AS.
Firewalls are not enabled.
Local and remote clients are allowed to connect to AS.
I can open TCP port 2383 with telnet on the AS server from the workstation.

Any one see anything I've missed or can shed some light on why the server is
not allowing connections?

Thanks,
Danny

Make sure you install "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " on you client machine

You can get it from http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||I think this gets installed with SQL 2005 locally but I reinstalled it. Unfortunately this had no impact and the error message is the same.|||

Take a look at this post: http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

In addition: Another way to test connectivity:

1. Create new empty text file.
2. Change it's extension to .udl
3. Double click on the file, and in the "Data Link Properties" dialog go to the "Provider" tab. Select there "Microsoft OLE DB Provider for Analysis Services 9.0" then "Next".
4 On the connection page type name of your server and select "Use Windows NT integrated security"

At this point you should be able to list of databases on Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||Thanks Edward. It succeeded on the Test connection and the initial catalog select list populated with the SSAS database names. Looks like the server is responding and the OLE DB driver for AS 9.0 is working. That narrows the issue down to MSExcel 2003 and/or the Addin.|||Issue somehow resolved itself after perfroming a repair on Excel following by reregistering the OLEDB 9.0 dll.sql

Tuesday, March 20, 2012

Can not bring MSDTC online in W2K3EE-SP1 cluster (2 nodes)

I've installed Windows Server 2003 EE SP1 Cluster successfully with two nodes
and now I'm trying to install MS SQL server 2000 Cluster on it..
as part of the preparation is to add new resource for MSDTC before install
SQL server 2000 then upgrade to sql server 2000 sp3a..
I've used two methods to add MSDTC resource to the cluster ... one by using
the Cluster resources Quorum disk and ip address... and the second time using
special ip and disk for MSDTC different than the quorum and add in separate
group.. but in both methods the same error msdtc resource failed..
errors in event log:
=================================
application log: eventid 4383
MS DTC was unable to determine the state of the cluster service on this
machine. MS DTC cannot continue to startup. Please contact Microsoft Product
Support. Error Specifics:
d:\srvrtm\com\complus\dtc\shared\mtxclu\mtxclusetu phelper.cpp:498, Pid: 2636,
CmdLine: C:\WINOS\system32\msdtc.exe
===========================================
in the security log: eventid 560
Object Open:
Object Server: SC Manager
Object Type: SERVICE OBJECT
Object Name: ClusSvc
Handle ID: -
Operation ID: {0,27022083}
Process ID: 632
Image File Name: C:\WINOS\system32\services.exe
Primary User Name: Q4A-DEV$
Primary Domain: IAEA
Primary Logon ID: (0x0,0x3E7)
Client User Name: NETWORK SERVICE
Client Domain: NT AUTHORITY
Client Logon ID: (0x0,0x3E4)
Accesses: READ_CONTROL
Query service configuration information
Query status of service
Enumerate dependencies of service
Query information from service
Privileges: -
Restricted Sid Count: 0
Access Mask: 0x2008D
========================================
in the system log
eventid 7034
The Distributed Transaction Coordinator service terminated unexpectedly. It
has done this 1 time(s).
======================================
Please let me know how to resolve it..
I've used as well the method in http://support.microsoft.com/kb/301600/en-us
but the same result..
I was reading the news and found that many have troubles during the
installation because the sql server 2000 EE doesn't contain sp3a and in many
cases it failed to continue with the installation on W2K3EESP1 in the process
before the upgrade to sp3a...
how to fix the msdtc problem in the cluster !!!?
Thanks
best regards,
Samo
Sounds like a permissions issue based on the info you posted. Check the
startup account for the MSDTC service on each node. Make sure it is a
domain-level account that has admin priviledges on the box. I generally use
the cluster service account for the MSDTC account to avoid any permissions
issues.
Geoff N. Hiten
Microsoft SQL Server MVP
"Samo" <Samo@.discussions.microsoft.com> wrote in message
news:1EF209B9-9074-4D0E-899E-25C46865BF52@.microsoft.com...
> I've installed Windows Server 2003 EE SP1 Cluster successfully with two
> nodes
> and now I'm trying to install MS SQL server 2000 Cluster on it..
> as part of the preparation is to add new resource for MSDTC before install
> SQL server 2000 then upgrade to sql server 2000 sp3a..
> I've used two methods to add MSDTC resource to the cluster ... one by
> using
> the Cluster resources Quorum disk and ip address... and the second time
> using
> special ip and disk for MSDTC different than the quorum and add in
> separate
> group.. but in both methods the same error msdtc resource failed..
> errors in event log:
> =================================
> application log: eventid 4383
> MS DTC was unable to determine the state of the cluster service on this
> machine. MS DTC cannot continue to startup. Please contact Microsoft
> Product
> Support. Error Specifics:
> d:\srvrtm\com\complus\dtc\shared\mtxclu\mtxclusetu phelper.cpp:498, Pid:
> 2636,
> CmdLine: C:\WINOS\system32\msdtc.exe
> ===========================================
> in the security log: eventid 560
> Object Open:
> Object Server: SC Manager
> Object Type: SERVICE OBJECT
> Object Name: ClusSvc
> Handle ID: -
> Operation ID: {0,27022083}
> Process ID: 632
> Image File Name: C:\WINOS\system32\services.exe
> Primary User Name: Q4A-DEV$
> Primary Domain: IAEA
> Primary Logon ID: (0x0,0x3E7)
> Client User Name: NETWORK SERVICE
> Client Domain: NT AUTHORITY
> Client Logon ID: (0x0,0x3E4)
> Accesses: READ_CONTROL
> Query service configuration information
> Query status of service
> Enumerate dependencies of service
> Query information from service
> Privileges: -
> Restricted Sid Count: 0
> Access Mask: 0x2008D
> ========================================
> in the system log
> eventid 7034
> The Distributed Transaction Coordinator service terminated unexpectedly.
> It
> has done this 1 time(s).
> ======================================
> Please let me know how to resolve it..
> I've used as well the method in
> http://support.microsoft.com/kb/301600/en-us
> but the same result..
> I was reading the news and found that many have troubles during the
> installation because the sql server 2000 EE doesn't contain sp3a and in
> many
> cases it failed to continue with the installation on W2K3EESP1 in the
> process
> before the upgrade to sp3a...
> how to fix the msdtc problem in the cluster !!!?
> Thanks
> --
> best regards,
> Samo
|||I've just spent two days trying to get SQL2K on a W2kEE (no sp1)
cluster.
My first problem was getting the MSDTC to come online. I could
configure it but not get it online.
I tried all the MS suggestions and more besides including
uninstall/reinstall MSDTC. In a vain attempt to get it working I ended
up breaking the cluster service, it refused to start.
My solution was to rebuild the server, setup my cluster group for
network/quorom, then before setting up DTC group, make registry change
for the Clusterinstallstate, enable network DTC and it worked first
time.
Sorry I couldn't give you a quick fix. I've still got to fix my
installation failure - unable to install SQL on a 2nd node.
Steve
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message news:<eDd30kSTFHA.3392@.TK2MSFTNGP12.phx.gbl>...[vbcol=seagreen]
> Sounds like a permissions issue based on the info you posted. Check the
> startup account for the MSDTC service on each node. Make sure it is a
> domain-level account that has admin priviledges on the box. I generally use
> the cluster service account for the MSDTC account to avoid any permissions
> issues.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "Samo" <Samo@.discussions.microsoft.com> wrote in message
> news:1EF209B9-9074-4D0E-899E-25C46865BF52@.microsoft.com...
|||I've used the Cluster service account which has local admin rights, log on as
service, etc on both nodes but the same application eventid 4383 error
persist and msdtc failed to start ...
best regards,
Samo
"Geoff N. Hiten" wrote:

> Sounds like a permissions issue based on the info you posted. Check the
> startup account for the MSDTC service on each node. Make sure it is a
> domain-level account that has admin priviledges on the box. I generally use
> the cluster service account for the MSDTC account to avoid any permissions
> issues.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "Samo" <Samo@.discussions.microsoft.com> wrote in message
> news:1EF209B9-9074-4D0E-899E-25C46865BF52@.microsoft.com...
>
>
|||Just to let you know , the MSDTC resource started without problem after
using the cluster service account and "restarting the cluster service" which
is strange...
a good start.. now I'll start with the active/active installation of sql
server 2000 EE cluster and let you know if I face any issue...
P.S.: I'm installing it on W2K3EE SP1 cluster...
Thanks,
best regards,
Samo
"Samo" wrote:
[vbcol=seagreen]
> I've used the Cluster service account which has local admin rights, log on as
> service, etc on both nodes but the same application eventid 4383 error
> persist and msdtc failed to start ...
> --
> best regards,
> Samo
>
> "Geoff N. Hiten" wrote:
|||Hi,
I'm interested by what you say about using the cluster service account.
Did you use this account to start the DTC service?
Steve
"Samo" wrote:
[vbcol=seagreen]
> Just to let you know , the MSDTC resource started without problem after
> using the cluster service account and "restarting the cluster service" which
> is strange...
> a good start.. now I'll start with the active/active installation of sql
> server 2000 EE cluster and let you know if I face any issue...
> P.S.: I'm installing it on W2K3EE SP1 cluster...
> Thanks,
> --
> best regards,
> Samo
>
> "Samo" wrote:

Can not access SQL Server

Hi,
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
KevinRun a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==> How to fix this problem?
> Thanks in advance
> Kevin
>|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server sucessfully,
>> but in the ASP.Net application, I can not, the error message say that
>> "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist security
>> info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application. I
>> found something in the following article, I try but still doesn't work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
--
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>>I would expect that to apply to both connections from Winform and ASP.NET.
>>Can you perform a profile trace on to see what credentials are being used
>>for the failing connection.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application. I
>> found something in the following article, I try but still doesn't work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
>> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where to
>> look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>>
>|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:DEUTe.127980$Lg2.47868@.fe12.news.easynews.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>> Hi, Nik,
>> I use profile trace, but there is no login or login fail events when
>> using ASP.Net. There is login even when using WinForm.
>> The source code and connection string are the same in WinForm and
>> ASP.Net.
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>>I would expect that to apply to both connections from Winform and
>>ASP.NET. Can you perform a profile trace on to see what credentials are
>>being used for the failing connection.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>> It's not network problem, I can connect through a WinForm application.
>> I found something in the following article, I try but still doesn't
>> work.
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;888228
>> By the way, the two machines are in different domain.
>> Regars
>> Kevin
>>
>>
>> "Nik Marshall-Blank" <Nik@.Operatelecom.com> дÈëÏûÏ¢ÐÂÎÅ:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>> Run a profiler trace on the SQL server to see if the login attempt is
>> making it the the SQL server. This will give you insight in to where
>> to look next for the problem, network or program.
>> --
>> Nik Marshall-Blank MCSD/MCDBA
>> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
>> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>> Hi,
>> In this case, the environment is:
>> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
>> 10.35.3.43)
>> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
>> WinForms application. (In the same subnet)
>> In the WinForms application, I can connect to the SQL server
>> sucessfully, but in the ASP.Net application, I can not, the error
>> message say that "SQL Server does not exist, or access deny".
>> The code is the same in ASP.Net application and WinForms application:
>> ==>>
>> string cnstring = "user id=sa;data source='10.35.3.43';persist
>> security info=True;initial catalog=MyDB;password='MyPassword'";
>> string cmdstring = "SELECT Count(*) FROM FunctionCode";
>> System.Data.SqlClient.SqlConnection cn = new
>> System.Data.SqlClient.SqlConnection(cnstring);
>> System.Data.SqlClient.SqlCommand cmd = new
>> System.Data.SqlClient.SqlCommand(cmdstring, cn);
>> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
>> int count = (int)cmd.ExecuteScalar();
>> cn.Close();
>> Response.Write(count.ToString());
>> <<==>> How to fix this problem?
>> Thanks in advance
>> Kevin
>>
>>
>>
>>
>>
>

Can not access SQL Server

Hi,
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
KevinRun a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==
> How to fix this problem?
> Thanks in advance
> Kevin
>|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/defaul...kb;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:4iSTe.305886$WN5.7191@.fe02.news.eas
ynews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/defaul...kb;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:4iSTe.305886$WN5.7191@.fe02.news.easynews.com...
>|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:XrTTe.308487$kM5.134787@.fe01.news.e
asynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:XrTTe.308487$kM5.134787@.fe01.news.easynews.com...
>|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:DEUTe.127980$Lg2.47868@.fe12.news.ea
synews.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>

Can not access SQL Server

Hi,
In this case, the environment is:
Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address: 10.35.3.43)
Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a WinForms
application. (In the same subnet)
In the WinForms application, I can connect to the SQL server sucessfully,
but in the ASP.Net application, I can not, the error message say that "SQL
Server does not exist, or access deny".
The code is the same in ASP.Net application and WinForms application:
==>>
string cnstring = "user id=sa;data source='10.35.3.43';persist security
info=True;initial catalog=MyDB;password='MyPassword'";
string cmdstring = "SELECT Count(*) FROM FunctionCode";
System.Data.SqlClient.SqlConnection cn = new
System.Data.SqlClient.SqlConnection(cnstring);
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand(cmdstring, cn);
cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
int count = (int)cmd.ExecuteScalar();
cn.Close();
Response.Write(count.ToString());
<<==
How to fix this problem?
Thanks in advance
Kevin
Run a profiler trace on the SQL server to see if the login attempt is making
it the the SQL server. This will give you insight in to where to look next
for the problem, network or program.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In this case, the environment is:
> Machine A: SQL Server 2000 SP3 on Windows 2003 SP1. (IP Address:
> 10.35.3.43)
> Machine B: IIS Server on Windows XP SP2, an ASP.Net application, a
> WinForms application. (In the same subnet)
> In the WinForms application, I can connect to the SQL server sucessfully,
> but in the ASP.Net application, I can not, the error message say that "SQL
> Server does not exist, or access deny".
> The code is the same in ASP.Net application and WinForms application:
> ==>>
> string cnstring = "user id=sa;data source='10.35.3.43';persist security
> info=True;initial catalog=MyDB;password='MyPassword'";
> string cmdstring = "SELECT Count(*) FROM FunctionCode";
> System.Data.SqlClient.SqlConnection cn = new
> System.Data.SqlClient.SqlConnection(cnstring);
> System.Data.SqlClient.SqlCommand cmd = new
> System.Data.SqlClient.SqlCommand(cmdstring, cn);
> cn.Open(); //Suceeds in WinForm, but fails in ASP.Net
> int count = (int)cmd.ExecuteScalar();
> cn.Close();
> Response.Write(count.ToString());
> <<==
> How to fix this problem?
> Thanks in advance
> Kevin
>
|||It's not network problem, I can connect through a WinForm application. I
found something in the following article, I try but still doesn't work.
http://support.microsoft.com/default...b;en-us;888228
By the way, the two machines are in different domain.
Regars
Kevin
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:4iSTe.305886$WN5.7191@.fe02.news.easyn ews.com...
> Run a profiler trace on the SQL server to see if the login attempt is
> making it the the SQL server. This will give you insight in to where to
> look next for the problem, network or program.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%23g6oPUDtFHA.1252@.TK2MSFTNGP09.phx.gbl...
>
|||I would expect that to apply to both connections from Winform and ASP.NET.
Can you perform a profile trace on to see what credentials are being used
for the failing connection.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
> It's not network problem, I can connect through a WinForm application. I
> found something in the following article, I try but still doesn't work.
> http://support.microsoft.com/default...b;en-us;888228
> By the way, the two machines are in different domain.
> Regars
> Kevin
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:4iSTe.305886$WN5.7191@.fe02.news.easyn ews.com...
>
|||Hi, Nik,
I use profile trace, but there is no login or login fail events when using
ASP.Net. There is login even when using WinForm.
The source code and connection string are the same in WinForm and ASP.Net.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:XrTTe.308487$kM5.134787@.fe01.news.eas ynews.com...
>I would expect that to apply to both connections from Winform and ASP.NET.
>Can you perform a profile trace on to see what credentials are being used
>for the failing connection.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:%237j8zSFtFHA.2792@.tk2msftngp13.phx.gbl...
>
|||Ok now we're getting somewhere, not sure where yet but we now going to look
at the ASP.Net server more closely.
But first just try adding the account under which ASP.Net runs as a login on
the SQL Server and see if it connects.
Nik Marshall-Blank MCSD/MCDBA
"Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
> Hi, Nik,
> I use profile trace, but there is no login or login fail events when using
> ASP.Net. There is login even when using WinForm.
> The source code and connection string are the same in WinForm and ASP.Net.
>
>
> "Nik Marshall-Blank" <Nik@.Operatelecom.com>
> д?:XrTTe.308487$kM5.134787@.fe01.news.eas ynews.com...
>
|||I now found the root cause. It's because the Machine A and Machine B are in
different domain, two domains are not trusted. If both machines in the same
domain, it works.
The reason why WinForm app succeeds is because Machine B have stored a use
account and password on Domain A, I could see the NT user name from sql
profiler, it's Domain A's user account.
"Nik Marshall-Blank" <Nik@.Operatelecom.com> д?:DEUTe.127980$Lg2.47868@.fe12.news.easy news.com...
> Ok now we're getting somewhere, not sure where yet but we now going to
> look at the ASP.Net server more closely.
> But first just try adding the account under which ASP.Net runs as a login
> on the SQL Server and see if it connects.
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Kevin Dai" <Kevin_Dzy@.Hotmail.com> wrote in message
> news:eYSsLGGtFHA.3908@.tk2msftngp13.phx.gbl...
>

Saturday, February 25, 2012

Can I use dynamic SQL in a stored procedure to call another stored

Hi,
I am having one stored procedure named SP1 which is having one input and one
output parameter as follows
CREATE PROCEDURE dbo.SP1
@.xmldoc TEXT
,@.FLAG_EXEC VARCHAR(5)
AS
BEGIN
...
END
I have write another stored procedure named SP2 which is creating a dynamic
SQL statement like
CREATE PROCEDURE dbo.SP2
AS
BEGIN
DECLARE @.CURR_PROC_NAME VARCHAR(125)
DECLARE @.STR_XML_AS_VARCHAR VARCHAR(125)
DECLARE @.STR_RET_QRY_MN VARCHAR(125)
DECLARE @.STR_EXECUTE_QRY VARCHAR(4000)
SET @.STR_EXECUTE_QRY = 'exec ' + @.CURR_PROC_NAME + ''''+
@.STR_XML_AS_VARCHAR + ''' , @.STR_RET_QRY_MN OUTPUT ,@.FLAG_EXEC = ''FALSE'' '
print @.STR_EXECUTE_QRY
EXEC (@.STR_EXECUTE_QRY)
END
but it always says to declare @.STR_RETURN_STRING variable. Can I do like
above? If yes then how? If no then why?
With thanx in advance,Hi Rajendra,
this does not work because each EXEC is running in it's own process.
That means in fact that proc2 does not know anything about the variables
you have declared in proc1.
You should handle it as follows:
Proc2 (Sub-Proc) writes the ReturnValue into a table
Proc2 (Calling Proc) reads after the run of Proc2 the value from the table
Another way is to work with "sp_executesql". See BOL for details...
HTH ;-)
Gru, Uwe Ricken
MCP for SQL Server 2000 Database Implementation
GNS GmbH, Frankfurt am Main
http://www.gns-online.de
http://www.memberadmin.de
http://www.conferenceadmin.de
________________________________________
____________
dbdev: http://www.dbdev.org
APP: http://www.AccessProfiPool.de
FAQ: http://www.donkarl.com/AccessFAQ.htm|||Rajendra (Rajendra@.discussions.microsoft.com) writes:
> I have write another stored procedure named SP2 which is creating a
> dynamic SQL statement like
> CREATE PROCEDURE dbo.SP2
> AS
> BEGIN
> DECLARE @.CURR_PROC_NAME VARCHAR(125)
> DECLARE @.STR_XML_AS_VARCHAR VARCHAR(125)
> DECLARE @.STR_RET_QRY_MN VARCHAR(125)
> DECLARE @.STR_EXECUTE_QRY VARCHAR(4000)
> SET @.STR_EXECUTE_QRY = 'exec ' + @.CURR_PROC_NAME + ''''+
> @.STR_XML_AS_VARCHAR + ''' , @.STR_RET_QRY_MN OUTPUT ,@.FLAG_EXEC = ''FALSE''
'
> print @.STR_EXECUTE_QRY
> EXEC (@.STR_EXECUTE_QRY)
> END
> but it always says to declare @.STR_RETURN_STRING variable. Can I do like
> above? If yes then how? If no then why?
You are making it too complicated. Just say:
EXEC @.CURR_PROC_NAME @.STR_XML_AS_VARCHAR, STR_RET_QRY_MN OUTPUT,
@.FLAG_EXEC = 'FALSE'
This will execute the procedure of which the name is in @.CURR_PROC_NAME.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Friday, February 10, 2012

Can I install SQL2005 SP2 to TFS server?

Hi!

We have a TFS server include this components:

windows standard R2 server + SP1

Microsoft SQL Server 2005 + SP1

Microsoft Visual Studio 2005 Team Foundation Server - ENU + SP1

Microsoft Windows SharePoint Services 2.0.

Can I install sql 2005 SP2 without any problem?

Best Regards,

Mihaly Demeczky

To my knowledge, there are no know issues with adding SQL Server 2005 SP2. If your SQL Sevrer is on a VHD, make a copy, otherwise, set a 'SavePoint' -just in case.