Showing posts with label instances. Show all posts
Showing posts with label instances. Show all posts

Monday, March 19, 2012

connection issues when running multiple instances of same application

I am running multiple instance of the same application. This application is connecting to the database and running stored procedures using ADODB (all code examples are taken from msado15).

The problem is that somehow these two applications are sharing something either with the connection or commands.

For instance if the two instances are in the following function at the same time then they both thow an SEH exception:

Code Snippet

inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {

struct _Recordset * _result = 0;

HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

return _RecordsetPtr(_result, false);

}

The exception that occurs is: "First-chance exception ...: 0xC0000005: Access violation reading location 0x00000068."

And afterwords when they go to release the command an error occurs on

First-chance exception at 0x4de4120c in IpsEngine.exe: 0xC0000005: Access violation reading location 0xcccccccc.

Code Snippet

inline void _bstr_t::Data_t::_Free() throw()

{

if (m_wstr != NULL) {

::SysFreeString(m_wstr);

}

if (m_str != NULL) {

delete [] m_str;

}

}

This is being called from.

Code Snippet

inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {

HRESULT _hr = putref_ActiveConnection(ppvObject);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

}

The exception that occurs: First-chance exception at ...: 0xC0000005: Access violation reading location 0xcccccccc.

Similarly when one instance releases a command using

Code Snippet

inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {

HRESULT _hr = putref_ActiveConnection(ppvObject);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

}

The second instance of the application fails when running the command at the exact same time.

Code Snippet

inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {

struct _Recordset * _result = 0;

HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

return _RecordsetPtr(_result, false);

}

The command and connections are not static and there should be completely seperate instances of these for each instance of the application. Does anybody know why this may be happening. Any help would be appreciated. Thanks in advance.

All of these access issues are with pointers being passed into these functions. As such, we don't have much context with which to help you with these issues. Any issue could be causing these problems including: double freeing, not allocating memory elsewhere or failure to properly initialize memory, failure to check return codes of functions that return memory, etc. In these cases, we need to see the context surrounding the variables that are causing the AV, in for example: for Command15::Execute, RecordsAffected and Parameters would be the variables of interest, we would need to see how they are allocated, initialized, and used prior to this function call in the execution context of a failure, and how they are allocated, initialized, and used prior to this function call in the execution context of success. The most likely cause of this AV is failure to handle error conditions coming back from functions that allocate memory on success.

Thanks,

John

|||

But when I run only one instance of the application at a time it works fine, I have been running it already for a long time and never had a problem. How is it that running two seperate instances of the application could cause this error. The memory allocation would not change just because there are two instances? would it?

connection issues when running multiple instances of same application

I am running multiple instance of the same application. This application is connecting to the database and running stored procedures using ADODB (all code examples are taken from msado15).

The problem is that somehow these two applications are sharing something either with the connection or commands.

For instance if the two instances are in the following function at the same time then they both thow an SEH exception:

Code Snippet

inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {

struct _Recordset * _result = 0;

HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

return _RecordsetPtr(_result, false);

}

The exception that occurs is: "First-chance exception ...: 0xC0000005: Access violation reading location 0x00000068."

And afterwords when they go to release the command an error occurs on

First-chance exception at 0x4de4120c in IpsEngine.exe: 0xC0000005: Access violation reading location 0xcccccccc.

Code Snippet

inline void _bstr_t::Data_t::_Free() throw()

{

if (m_wstr != NULL) {

::SysFreeString(m_wstr);

}

if (m_str != NULL) {

delete [] m_str;

}

}

This is being called from.

Code Snippet

inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {

HRESULT _hr = putref_ActiveConnection(ppvObject);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

}

The exception that occurs: First-chance exception at ...: 0xC0000005: Access violation reading location 0xcccccccc.

Similarly when one instance releases a command using

Code Snippet

inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {

HRESULT _hr = putref_ActiveConnection(ppvObject);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

}

The second instance of the application fails when running the command at the exact same time.

Code Snippet

inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {

struct _Recordset * _result = 0;

HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);

if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));

return _RecordsetPtr(_result, false);

}

The command and connections are not static and there should be completely seperate instances of these for each instance of the application. Does anybody know why this may be happening. Any help would be appreciated. Thanks in advance.

All of these access issues are with pointers being passed into these functions. As such, we don't have much context with which to help you with these issues. Any issue could be causing these problems including: double freeing, not allocating memory elsewhere or failure to properly initialize memory, failure to check return codes of functions that return memory, etc. In these cases, we need to see the context surrounding the variables that are causing the AV, in for example: for Command15::Execute, RecordsAffected and Parameters would be the variables of interest, we would need to see how they are allocated, initialized, and used prior to this function call in the execution context of a failure, and how they are allocated, initialized, and used prior to this function call in the execution context of success. The most likely cause of this AV is failure to handle error conditions coming back from functions that allocate memory on success.

Thanks,

John

|||

But when I run only one instance of the application at a time it works fine, I have been running it already for a long time and never had a problem. How is it that running two seperate instances of the application could cause this error. The memory allocation would not change just because there are two instances? would it?

Sunday, March 11, 2012

Connection handshake failed.

Hi.

I created two instances of SQL Server Dev Edition on the same machine.

The two instances acted as the sender / receiver.

However, when the message is transmitted from "Sender" to "Receiver", the following errors are
displayed in "SQL Profiler".

「Connection handshake failed. There is no compatible authentication protocol. State 21.」

How should be dealt with with this?
My best regards.

piknik

Seems like there is a problem with how you've setup your endpoints. Could you paste the script which you used for creating the endpoints? If you don't have that, could you paste the results from this query run on both instances?

select * from sys.service_broker_endpoints

|||

One machine is configured to use CERTIFICATE authentication, the other is configured to use WINDOWS. (or one is configured to use WINDOWS KERBEROS and the other WINDOWS NTLM).

Configure the endpoints to have at least one compatible authentication protocol and it will work.

HTH,
~ Remus

|||

Thank you for the reply.

I used following Script.

[Sender]

USE master
GO

-- Create master key in the master database
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'password62374'

-- Create the certificate for transport security
CREATE CERTIFICATE TransportCert1
FROM FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\TransportCert1.cer'
WITH PRIVATE KEY (
FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\TransportCert1.pvk',
DECRYPTION BY PASSWORD = 'password62374'
)
ACTIVE FOR BEGIN_DIALOG = ON
GO

-- Create a user in the master db to be associated with
-- the public key from the remote certificate (TestCert2.cer)
CREATE LOGIN remcert WITH PASSWORD = 'password62374'
CREATE USER remcert FOR LOGIN remcert

-- remcert has to have connect priviliges
GRANT CONNECT TO remcert

-- Install the public key from the remote cert in master
CREATE CERTIFICATE TransportCert2
AUTHORIZATION remcert
FROM FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\TransportCert2.cer'
ACTIVE FOR BEGIN_DIALOG = ON
GO

-- Switch to the user database
USE SuperMarketServer
GO

-- Create a master key
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'password62374'

-- Create a certificate for dialog security
CREATE CERTIFICATE DialogCert1
FROM FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\DialogCert1.cer'
WITH PRIVATE KEY (
FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\DialogCert1.pvk',
DECRYPTION BY PASSWORD = 'password62374'
)
ACTIVE FOR BEGIN_DIALOG = ON
GO

-- Create user that holds the remote public key for the dialog security certificate
CREATE USER remcert FOR LOGIN remcert

CREATE CERTIFICATE DialogCert2
AUTHORIZATION remcert
FROM FILE = 'C:\Documents and Settings\ryutai\Desktop\Demo\Certs\DialogCert2.cer'
ACTIVE FOR BEGIN_DIALOG = ON
GO

-- Create a remote service binding associating the remcert user
-- with the remote service
CREATE REMOTE SERVICE BINDING [SellItemBinding]
TO SERVICE 'SellItemService'
WITH USER = remcert,
ANONYMOUS = Off

-- The user has to have SEND permissions
GRANT SEND ON SERVICE::[SoldItemService] TO remcert
go

-- Enable communication between instances by creating an endpoint
CREATE ENDPOINT ServerEndpoint
STATE = STARTED
AS TCP
(
LISTENER_PORT = 5024
)
FOR SERVICE_BROKER (AUTHENTICATION = CERTIFICATE TransportCert1)

-- Finally grant connect permission to user used to secure the dialog
USE master
GO

GRANT CONNECT ON ENDPOINT::ServerEndpoint TO remcert
GO

SELECT * FROM sys.endpoints
--

It is set to "CERTIFICATE authentication" as which Sender and Reciver are the
same.

The sample of Script is put.
http://enterpriselibrary.jp/SampleDemo.zip

My Best Regards.

piknik.


Thursday, March 8, 2012

connection failure

Hi all,
Everything is fine until today.
I have two instances(both msde databases, but I have enterprise manager and
analyser installed) on my computer one instance is mssql and the other is
mssql$netsdk (asp.net starter kit database)
somehow the connection to mssql$netsdk is failed which display in enterprise
manager.
So I removed the origianl server registration and start a new one, I type
"BETTYPC\NETSDK" as server and using windows authentication when doing the
registration, but the message display at the last step:
sql server registration failed because of connection failure displayed
below:sqldumpexceptionhandler :process 53 generated a fatal exception
c0000005 EXCEPTION_ACCESS_VIOLATION, sql server is terminating this process.
what's the problem?
Can you help and I am desperated
Betty
Hi Bettys,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you are not able to connect the SQL
Server named instance NETSDK with error message EXCEPTION_ACCESS_VIOLATION.
If I have misunderstood your concern, please feel free to point it out.
AV errors could be caused by various reasons, please perform the steps
below and let me know the result
1. Check the log file of NETSDK instance, make sure whether the instance
was started correctly.
Defautly, the log will be located at C:\Program Files\Microsoft SQL
Server\MSSQL$NETSDK\log, you may paste them here or send to me directly
v-mingqc@.ONLINEmicrosoft.com if you have concerns on security. (Note that
REMOVE ONLINE in my email address before you click SEND)
2. Is it possible to connect the instance via OSQL and Query Analyzer?
3. Is it possible for you to connect via SQL Authentication?
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 Michael,
Thank you, this is the first post on this forum. I didn't know what went
wrong. The only thing I can do is googling. Then it came to my mind that I
can stop the mssql@.netsdk sql server then and I restarted. It just started
and stopped again somehow. And then I have to restart the computer. After
that I saw both instances have sqlservr.exe process. This time I register the
server again and it looks fine. Connection is OK.
(I didn't try to use osql and did try to use sql authentication, but when I
supplied one userID and password to this server, this password is set up to a
database on this server, it should be OK right? it didn't work either.)
If you can tell what was going on, that will be great.
Here is the paste from errorLog:
2006-02-02 13:12:54.28 server Microsoft SQL Server 2000 - 8.00.760
(Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 1)
2006-02-02 13:12:54.28 server Copyright (C) 1988-2002 Microsoft
Corporation.
2006-02-02 13:12:54.28 server All rights reserved.
2006-02-02 13:12:54.28 server Server Process ID is 2988.
2006-02-02 13:12:54.28 server Logging SQL Server messages in file
'C:\Program Files\Microsoft SQL Server\MSSQL$NETSDK\LOG\ERRORLOG'.
2006-02-02 13:12:54.32 server SQL Server is starting at priority class
'normal'(2 CPUs detected).
2006-02-02 13:12:54.50 server SQL Server configured for thread mode
processing.
2006-02-02 13:12:54.50 server Using dynamic lock allocation. [500] Lock
Blocks, [1000] Lock Owner Blocks.
2006-02-02 13:12:54.52 spid4 Starting up database 'master'.
2006-02-02 13:12:54.57 server Using 'SSNETLIB.DLL' version '8.0.766'.
2006-02-02 13:12:54.57 spid5 Starting up database 'model'.
2006-02-02 13:12:54.57 spid4 Server name is 'BETTYPC\NETSDK'.
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 4
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 5
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 6
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 7
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 8
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 9
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 10
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 11
2006-02-02 13:12:54.57 spid4 Starting up database 'subway'.
2006-02-02 13:12:54.66 spid5 Clearing tempdb database.
2006-02-02 13:12:55.72 server SQL server listening on .
2006-02-02 13:12:55.72 server Error: 17826, Severity: 18, State: 1
2006-02-02 13:12:55.72 server Could not set up Net-Library 'SSNETLIB'..
2006-02-02 13:12:55.72 server Unable to load any netlibs.
2006-02-02 13:12:55.72 server SQL Server could not spawn FRunCM thread.
Here is the sqldump file
================================================== ===================
BugCheck Dump
================================================== ===================
This file is generated by Microsoft SQL Server 8.00.760
upon detection of fatal unexpected error. Please return this file,
the query or program that produced the bugcheck, the database and
the error log, and any other pertinent information with a Service Request.
Betty
"Michael Cheng [MSFT]" wrote:

> Hi Bettys,
> Welcome to use MSDN Managed Newsgroup!
> From your descriptions, I understood you are not able to connect the SQL
> Server named instance NETSDK with error message EXCEPTION_ACCESS_VIOLATION.
> If I have misunderstood your concern, please feel free to point it out.
> AV errors could be caused by various reasons, please perform the steps
> below and let me know the result
> 1. Check the log file of NETSDK instance, make sure whether the instance
> was started correctly.
> Defautly, the log will be located at C:\Program Files\Microsoft SQL
> Server\MSSQL$NETSDK\log, you may paste them here or send to me directly
>if you have concerns on security. (Note that
> REMOVE ONLINE in my email address before you click SEND)
> 2. Is it possible to connect the instance via OSQL and Query Analyzer?
> 3. Is it possible for you to connect via SQL Authentication?
>
> 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 Betty,
It seems your SQL Server is not stable. From the startup log, I believe
something internal is wrong. We may noticed "netlibs" is not loaded and
Dump file were also generated.
Although you could register SQL Server now, I would recommend you backup
all the data in this instnace and perform a reinstallation of NETSDK
instance. You may follow the link below to perform a complete uninstall
How to manually remove SQL Server 2000 default, named, or virtual instance
http://support.microsoft.com/kb/290991
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.

Connection fails for SQL Server 2005

I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
in getting any of the instances to start. Within Computer Management, the SQL
Server Configuration Manager reports "Cannot connect to WMI provider. You do
not have permission or the server is unreachable. etc, etc. Access is
denied.[0x80070005]".
I have been tearing my hair out all day trying to work out why I cannot get
this to start. Can anyone here give me some pointers as to what to do?
--
--
Chris JonesTry:
http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
--
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> in getting any of the instances to start. Within Computer Management, the
> SQL
> Server Configuration Manager reports "Cannot connect to WMI provider. You
> do
> not have permission or the server is unreachable. etc, etc. Access is
> denied.[0x80070005]".
> I have been tearing my hair out all day trying to work out why I cannot
> get
> this to start. Can anyone here give me some pointers as to what to do?
> --
> --
> Chris Jones
>|||oj
I already tried that. The response from the command was:-
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmprovider.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines
4 - 7:
Error Number: 0x80070005, Facility: Win32
Description: Access is denied.
Compiler returned error 0x80070005
Lines 4-7 read:
Instance of __Namespace
{
Name = "Microsoft";
};
Any ideas, anyone?
--
--
Chris Jones
"oj" wrote:
> Try:
> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> > in getting any of the instances to start. Within Computer Management, the
> > SQL
> > Server Configuration Manager reports "Cannot connect to WMI provider. You
> > do
> > not have permission or the server is unreachable. etc, etc. Access is
> > denied.[0x80070005]".
> >
> > I have been tearing my hair out all day trying to work out why I cannot
> > get
> > this to start. Can anyone here give me some pointers as to what to do?
> > --
> > --
> > Chris Jones
> >
>
>|||This is a multi-part message in MIME format.
--=_NextPart_000_001E_01C6A381.F5475800
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
Chris,
WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> =right click on my computer to access the properties page) and make sure =that distributed com is on, plus, the access and launch permission is =set correctly for your system.
"
a.. Under Default Access Permissions click Edit Default. Make sure =SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication =credentials will be used to access the COM application all have Local =and Remote Access permissions.
a.. Under Default Access Permissions click Edit Limits. Service Pack 2 =comes with the following default values: ANONYMOUS LOGON (Local Access) =and Everyone (Local and Remote Access). Make sure these values are =listed, and then add the user whose authentication credentials will be =used to access the COM application. Allow this user to have Local and =Remote Access permissions.
a.. Under Default Launch Permissions click Edit Default. Make sure =SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication =credentials will be used to access the COM application all have Local =and Remote Launch permissions, as well as Local and Remote Activation =permissions.
a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 =comes with the following default values: MACHINE\Administrators (Local =and Remote Launch, Local and Remote Activation) and Everyone (Local =Launch and Local Activation). Make sure these values are listed, and =then add the user whose authentication credentials will be used to =access the COM application. Allow this user to have Local and Remote =Launch permissions, as well as Local and Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.m=
spx
-- -oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message =news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...
> oj
> > I already tried that. The response from the command was:-
> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> Parsing MOF file: sqlmgmprovider.mof
> MOF file has been successfully parsed
> Storing data in the repository...
> An error occurred while opening the namespace for object 1 defined on =lines > 4 - 7:
> Error Number: 0x80070005, Facility: Win32
> Description: Access is denied.
> > Compiler returned error 0x80070005
> > Lines 4-7 read:
> > Instance of __Namespace
> {
> Name =3D "Microsoft";
> };
> > Any ideas, anyone?
> -- > -- > Chris Jones
> > > > "oj" wrote:
> >> Try:
>> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
>> >> -- >> -oj
>> >> >> >> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message =
>> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary =difficulty
>> > in getting any of the instances to start. Within Computer =Management, the >> > SQL
>> > Server Configuration Manager reports "Cannot connect to WMI =provider. You >> > do
>> > not have permission or the server is unreachable. etc, etc. Access =is
>> > denied.[0x80070005]".
>> >
>> > I have been tearing my hair out all day trying to work out why I =cannot >> > get
>> > this to start. Can anyone here give me some pointers as to what to =do?
>> > -- >> > -- >> > Chris Jones
>> > >> >> --=_NextPart_000_001E_01C6A381.F5475800
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Chris,WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers =-> right click on my computer to access the properties page) and make sure =that distributed com is on, plus, the access and launch permission is set =correctly for your system."
Under Default Access Permissions click Edit Default. =Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application =all have Local and Remote Access permissions. Under Default Access Permissions click Edit Limits. =Service Pack 2 comes with the following default values: ANONYMOUS LOGON =(Local Access) and Everyone (Local and Remote Access). Make sure these =values are listed, and then add the user whose authentication credentials will =be used to access the COM application. Allow this user to have Local and =Remote Access permissions. Under Default Launch Permissions click Edit Default. =Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application =all have Local and Remote Launch permissions, as well as Local and =Remote Activation permissions. Under Default Launch Permissions click Edit Limits. =Service Pack 2 comes with the following default values: =MACHINE\Administrators (Local and Remote Launch, Local and Remote Activation) and =Everyone (Local Launch and Local Activation). Make sure these values are listed, =and then add the user whose authentication credentials will be used to access the =COM application. Allow this user to have Local and Remote Launch =permissions, as well as Local and Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/prodtechnol/winxppro/mainta=in/sp2netwk.mspx
-- -oj"Chris Jones" wrote in message news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...> =oj> > I already tried that. The response from the command =was:-> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180> =Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.> Parsing MOF =file: sqlmgmprovider.mof> MOF file has been successfully parsed> =Storing data in the repository...> An error occurred while opening the =namespace for object 1 defined on lines > 4 - 7:> Error Number: =0x80070005, Facility: Win32> Description: Access is denied.> > =Compiler returned error 0x80070005> > Lines 4-7 read:> => Instance of __Namespace> {> Name =3D ="Microsoft";> };> > Any ideas, anyone?> -- > -- > =Chris Jones> > > > "oj" wrote:> => Try:> =">http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx>= > -- > -oj> > > > "Chris Jones" =wrote in message > news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...> =>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty> > in getting any of the instances to start. =Within Computer Management, the > > SQL> > Server Configuration Manager reports "Cannot connect to WMI provider. You => > do> > not have permission or the server is =unreachable. etc, etc. Access is> > denied.[0x80070005]".> >> > I have been tearing my hair out all day trying to =work out why I cannot > > get> > this to start. Can =anyone here give me some pointers as to what to do?> > -- => > -- > > Chris Jones> > > => >

--=_NextPart_000_001E_01C6A381.F5475800--|||Oj
Thanks for the response. Unfortunately, this was too late to prevent me
re-installing XP. The original install of XP was an upgrade from Win2k Pro
and clearly had significant issues with all sorts of things that effectively
STOPPED SQL Server (and one or two other applications) from working.
I will bear your response in mind if I get any issues with SQL Server 2k5
when I install it later.
Thanks
--
--
Chris Jones
"oj" wrote:
> Chris,
> WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> right click on my computer to access the properties page) and make sure that distributed com is on, plus, the access and launch permission is set correctly for your system.
> "
> a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application all have Local and Remote Access permissions.
> a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes with the following default values: ANONYMOUS LOGON (Local Access) and Everyone (Local and Remote Access). Make sure these values are listed, and then add the user whose authentication credentials will be used to access the COM application. Allow this user to have Local and Remote Access permissions.
> a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application all have Local and Remote Launch permissions, as well as Local and Remote Activation permissions.
> a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes with the following default values: MACHINE\Administrators (Local and Remote Launch, Local and Remote Activation) and Everyone (Local Launch and Local Activation). Make sure these values are listed, and then add the user whose authentication credentials will be used to access the COM application. Allow this user to have Local and Remote Launch permissions, as well as Local and Remote Activation permissions.
> "
> Additional info on dcom vs winxp firewall setting can be found here:
> http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx
>
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...
> > oj
> >
> > I already tried that. The response from the command was:-
> > Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> > Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> > Parsing MOF file: sqlmgmprovider.mof
> > MOF file has been successfully parsed
> > Storing data in the repository...
> > An error occurred while opening the namespace for object 1 defined on lines
> > 4 - 7:
> > Error Number: 0x80070005, Facility: Win32
> > Description: Access is denied.
> >
> > Compiler returned error 0x80070005
> >
> > Lines 4-7 read:
> >
> > Instance of __Namespace
> > {
> > Name = "Microsoft";
> > };
> >
> > Any ideas, anyone?
> > --
> > --
> > Chris Jones
> >
> >
> >
> > "oj" wrote:
> >
> >> Try:
> >> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
> >>
> >> --
> >> -oj
> >>
> >>
> >>
> >> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> >> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
> >> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> >> > in getting any of the instances to start. Within Computer Management, the
> >> > SQL
> >> > Server Configuration Manager reports "Cannot connect to WMI provider. You
> >> > do
> >> > not have permission or the server is unreachable. etc, etc. Access is
> >> > denied.[0x80070005]".
> >> >
> >> > I have been tearing my hair out all day trying to work out why I cannot
> >> > get
> >> > this to start. Can anyone here give me some pointers as to what to do?
> >> > --
> >> > --
> >> > Chris Jones
> >> >
> >>
> >>
> >>

Connection fails for SQL Server 2005

I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
in getting any of the instances to start. Within Computer Management, the SQ
L
Server Configuration Manager reports "Cannot connect to WMI provider. You do
not have permission or the server is unreachable. etc, etc. Access is
denied.[0x80070005]".
I have been tearing my hair out all day trying to work out why I cannot get
this to start. Can anyone here give me some pointers as to what to do?
--
--
Chris JonesTry:
http://blogs.msdn.com/echarran/arch.../03/509061.aspx
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> in getting any of the instances to start. Within Computer Management, the
> SQL
> Server Configuration Manager reports "Cannot connect to WMI provider. You
> do
> not have permission or the server is unreachable. etc, etc. Access is
> denied.[0x80070005]".
> I have been tearing my hair out all day trying to work out why I cannot
> get
> this to start. Can anyone here give me some pointers as to what to do?
> --
> --
> Chris Jones
>|||oj
I already tried that. The response from the command was:-
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmprovider.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines
4 - 7:
Error Number: 0x80070005, Facility: Win32
Description: Access is denied.
Compiler returned error 0x80070005
Lines 4-7 read:
Instance of __Namespace
{
Name = "Microsoft";
};
Any ideas, anyone?
--
--
Chris Jones
"oj" wrote:

> Try:
> http://blogs.msdn.com/echarran/arch.../03/509061.aspx
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>
>|||Chris,
WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> righ
t click on my computer to access the properties page) and make sure that dis
tributed com is on, plus, the access and launch permission is set correctly
for your system.
"
a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM, I
NTERACTIVE, NETWORK, and the user whose authentication credentials will be u
sed to access the COM application all have Local and Remote Access permissio
ns.
a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes
with the following default values: ANONYMOUS LOGON (Local Access) and Every
one (Local and Remote Access). Make sure these values are listed, and then a
dd the user whose authentication credentials will be used to access the COM
application. Allow this user to have Local and Remote Access permissions.
a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, I
NTERACTIVE, NETWORK, and the user whose authentication credentials will be u
sed to access the COM application all have Local and Remote Launch permissio
ns, as well as Local and Remote Activation permissions.
a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes
with the following default values: MACHINE\Administrators (Local and Remote
Launch, Local and Remote Activation) and Everyone (Local Launch and Local A
ctivation). Make sure these values are listed, and then add the user whose a
uthentication credentials will be used to access the COM application. Allow
this user to have Local and Remote Launch permissions, as well as Local and
Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/pr...n/sp2netwk.mspx
--
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news:D8F5C485-6131-4B4
6-A637-86643F23D32F@.microsoft.com...[vbcol=seagreen]
> oj
>
> I already tried that. The response from the command was:-
> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> Parsing MOF file: sqlmgmprovider.mof
> MOF file has been successfully parsed
> Storing data in the repository...
> An error occurred while opening the namespace for object 1 defined on line
s
> 4 - 7:
> Error Number: 0x80070005, Facility: Win32
> Description: Access is denied.
>
> Compiler returned error 0x80070005
>
> Lines 4-7 read:
>
> Instance of __Namespace
> {
> Name = "Microsoft";
> };
>
> Any ideas, anyone?
> --
> --
> Chris Jones
>
>
>
> "oj" wrote:
>|||Oj
Thanks for the response. Unfortunately, this was too late to prevent me
re-installing XP. The original install of XP was an upgrade from Win2k Pro
and clearly had significant issues with all sorts of things that effectively
STOPPED SQL Server (and one or two other applications) from working.
I will bear your response in mind if I get any issues with SQL Server 2k5
when I install it later.
Thanks
--
--
Chris Jones
"oj" wrote:

> Chris,
> WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> ri
ght click on my computer to access the properties page) and make sure that d
istributed com is on, plus, the access and launch permission is set correctl
y for your system.
> "
> a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM,
INTERACTIVE, NETWORK, and the user whose authentication credentials will be
used to access the COM application all have Local and Remote Access permiss
ions.
> a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes with
the following default values: ANONYMOUS LOGON (Local Access) and Everyone (Local and
Remote Access). Make sure these values are listed, and then add the user whose auth
ent
ication credentials will be used to access the COM application. Allow this user to have Loca
l and Remote Access permissions.
> a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, INTERAC
TIVE, NETWORK, and the user whose authentication credentials will be used to access
the COM application all have Local and Remote Launch permissions, as well as Local a
nd
Remote Activation permissions.
> a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes with
the following default values: MACHINE\Administrators (Local and Remote Launch, Local
and Remote Activation) and Everyone (Local Launch and Local Activation). Make sure
the
se values are listed, and then add the user whose authentication credentials will be used to
access the COM application. Allow this user to have Local and Remote Launch permissions, as
well as Local and Remote Activation permissions.[vbcol=seagreen]
> "
> Additional info on dcom vs winxp firewall setting can be found here:
> [url]http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx[/ur
l]
>
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news
:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...

Tuesday, February 14, 2012

Connecting to SSIS in Management Studio.

Hi:

I have 4 named instances of SQL 2005 running on one of our sales server (dont ask me why I have 4 instances.Its a beefy box btw). All the instances have SSIS Packages (around 6-7 in each instance) saved to the SQL server and not to the file system. The issue is every time i need to look at the packages or export the packages from SSMS I have to edit the MsDtsSrvr.ini.xml and type in the named instance name within the <ServerName></ServerName> tag . I then have to restart my SSIS. I dont see an easier approach to this method.

This is causing me a lot of unnecessary time waste. is there anyway this can be automated where in i can pass the instance name dynamically to the ini file or even more best, can I have all the instance names in the ini file and some how look at the packages in each Instance. I am not sure how having all the instance names in the ini file woud resolve the issue though.

I know I can use BIDS which is much more flexible and a recommended approach but need a solution for looking at SSIS packages through SSMS in all of the 4 instances. I look forward to recommendations from anyone who have better ideas and suggestions.

Thank you

AK

you could create a console app that edits the xml file and re-starts ssis.|||

Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.

Thanks again

AK

|||

Ankith wrote:

Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.

Thanks again

AK

unfortunately, i don't have a code example to share with you. however, writing such an application should be fairly straightforward (provided that you know .NET). the .NET system.xml namespace provides a number of classes to manipulate xml data. also, the system.serviceprocess namespace provides classes to manipulate windows services.

i hope this helps.

|||

Hi Duane:

I got this working. I am posting the code snippet for the benefit of others. I have created a SQL Agent job that changes the server name in the XML ini file and restarts SSIS. Restarting I do it through the Job step. Works great.

if (File.Exists(xmlFile))
{
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);

XmlNode node = doc.SelectSingleNode(@."//*[local-name()='ServerName']");

if (node == null)
{
Console.Write("Node does not exist");
}
else
{
node.InnerText = value;
}

node = null;

doc.Save(xmlFile);

Thanks again for your help.

AK

|||Instead of switching between the servers, you can simply add them all to the SSIS service config file! Simply copy the <FOLDER> tag (till the end - </FOLDER>) as many times as you have SQL instances, give each one unique <NAME>, save config file and restart the SSIS service:

...
<TopLevelFolders>
<Folder xsi:type="SqlServerFolder">
<Name>Sql1</Name>
<ServerName>.\Instance1</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql2</Name>
<ServerName>.\Instance2</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql3</Name>
<ServerName>.\Instance3</ServerName>
</Folder>
</TopLevelFolders>
...|||

WOW!!!. Thats cool. Thanks Michael.I used your solution and it works great and I dont need my code anymore. DBAs who dont have much experience with C# will find your method really helpful.

Thanks for posting it.

Best Regards

AK

Connecting to SSIS in Management Studio.

Hi:

I have 4 named instances of SQL 2005 running on one of our sales server (dont ask me why I have 4 instances.Its a beefy box btw). All the instances have SSIS Packages (around 6-7 in each instance) saved to the SQL server and not to the file system. The issue is every time i need to look at the packages or export the packages from SSMS I have to edit the MsDtsSrvr.ini.xml and type in the named instance name within the <ServerName></ServerName> tag . I then have to restart my SSIS. I dont see an easier approach to this method.

This is causing me a lot of unnecessary time waste. is there anyway this can be automated where in i can pass the instance name dynamically to the ini file or even more best, can I have all the instance names in the ini file and some how look at the packages in each Instance. I am not sure how having all the instance names in the ini file woud resolve the issue though.

I know I can use BIDS which is much more flexible and a recommended approach but need a solution for looking at SSIS packages through SSMS in all of the 4 instances. I look forward to recommendations from anyone who have better ideas and suggestions.

Thank you

AK

you could create a console app that edits the xml file and re-starts ssis.|||

Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.

Thanks again

AK

|||

Ankith wrote:

Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.

Thanks again

AK

unfortunately, i don't have a code example to share with you. however, writing such an application should be fairly straightforward (provided that you know .NET). the .NET system.xml namespace provides a number of classes to manipulate xml data. also, the system.serviceprocess namespace provides classes to manipulate windows services.

i hope this helps.

|||

Hi Duane:

I got this working. I am posting the code snippet for the benefit of others. I have created a SQL Agent job that changes the server name in the XML ini file and restarts SSIS. Restarting I do it through the Job step. Works great.

if (File.Exists(xmlFile))
{
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);

XmlNode node = doc.SelectSingleNode(@."//*[local-name()='ServerName']");

if (node == null)
{
Console.Write("Node does not exist");
}
else
{
node.InnerText = value;
}

node = null;

doc.Save(xmlFile);

Thanks again for your help.

AK

|||Instead of switching between the servers, you can simply add them all to the SSIS service config file! Simply copy the <FOLDER> tag (till the end - </FOLDER>) as many times as you have SQL instances, give each one unique <NAME>, save config file and restart the SSIS service:

...
<TopLevelFolders>
<Folder xsi:type="SqlServerFolder">
<Name>Sql1</Name>
<ServerName>.\Instance1</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql2</Name>
<ServerName>.\Instance2</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql3</Name>
<ServerName>.\Instance3</ServerName>
</Folder>
</TopLevelFolders>
...|||

WOW!!!. Thats cool. Thanks Michael.I used your solution and it works great and I dont need my code anymore. DBAs who dont have much experience with C# will find your method really helpful.

Thanks for posting it.

Best Regards

AK

Friday, February 10, 2012

Connecting to SQL Server for Named Instances at client end

Hi all,

I have installed a named instance in my sql server. Am able to connect to the named instance at the server end. However, when i tried to register this named instance at my client end using sql enterprise manager, i have this error : Specified SQL Server not found. ConnectionOpen (Connect())

Let's say my servername is Intranet and the named instance is UAT.
Thus, i just have to supply the name to be --> Intranet\UAT . Am i correct? Please advise... have been figuring the whole morning still do not know what's wrong with it.You must add an alias that points to
\\computername\pipe\MSSQL$instancename. If you use an alias name
of computername\instancename, clients can connect by specifying this name in the same way as SQL Server 2000 clients do.

For the TCP/IP Sockets andNWLink IPX/SPX Net-Libraries, you must use the Client Network Utility to define an alias on the client that specifies the port address on which the named instance is listening.

Refer to this
MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_runsetup_2xmb.asp) article for more information.