Showing posts with label similar. Show all posts
Showing posts with label similar. Show all posts

Monday, March 19, 2012

Failed in installation, ERROR:29503

Hi, Folks

My story is a bit of similar to some of the fellows. During the default installation, it failed at the last section which is "SQL server database service" because it cannot start the SQL service.

The difference of my story is this is not the first time I install it on my computer or any upgrade from whatever other version. I'd installed it for a couple of weeks working perfectly before my computer seemingly infected by an adware. Since then SQL Server stopped working, then I decided to re-install it after I had the adware removed.

So it shouldn't be the limitation of either CPU or memory, I think. I hope I could get an answer to it before I have to re-install the whole OS, PAINFULLY.

CONTENT OF SUMMARY.LOG


Microsoft SQL Server 2005 9.00.1399.06
==============================
OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Time : Mon Jul 10 22:53:32 2006
Machine : YANG
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLSupport_1.log
--
Machine : YANG
Product : Microsoft SQL Server Native Client
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLNCLI_1.log
--
Machine : YANG
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SqlWriter_1.log
--
Machine : YANG
Product : MSXML 6.0 Parser
Product Version : 6.00.3883.8
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_MSXML6_1.log
--
Machine : YANG
Product : SQL Server Database Services
Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
--
Machine : YANG
Product : SQL Server Database Services
Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
--
Machine : YANG
Product : Microsoft SQL Server 2005 Express Edition
Product Version : 9.00.1399.06
Install : Failed
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQL.log
Last Action : InstallFinalize
Error String : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
The error is (1067) The process terminated

unexpectedly.
Error Number : 29503
--

SQL Server Setup failed. For more information, review the Setup log file in %ProgramFiles%\Microsoft SQL Server\90\Setup

Bootstrap\LOG\Summary.txt.


Time : Mon Jul 10 22:57:30 2006


List of log files:
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Core(Local).log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLSupport_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLNCLI_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SqlWriter_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_MSXML6_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQL.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Datastore.xml
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_.NET Framework 2.0.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SNAC.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Core.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Support.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SCC.log
c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

|||

CONTENT OF ERROR.LOG

2006-07-10 22:56:35.05 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

2006-07-10 22:56:35.05 Server (c) 2005 Microsoft Corporation.
2006-07-10 22:56:35.05 Server All rights reserved.
2006-07-10 22:56:35.05 Server Server process ID is 504.
2006-07-10 22:56:35.05 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-07-10 22:56:35.05 Server Registry startup parameters:
2006-07-10 22:56:35.05 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-07-10 22:56:35.05 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-07-10 22:56:35.05 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-07-10 22:56:35.05 Server Command Line Startup Parameters:
2006-07-10 22:56:35.05 Server -m SqlSetup
2006-07-10 22:56:35.05 Server SqlSetup
2006-07-10 22:56:35.05 Server -Q
2006-07-10 22:56:35.05 Server -q Chinese_PRC_CI_AS
2006-07-10 22:56:35.05 Server -T 4022
2006-07-10 22:56:35.05 Server -T 3659
2006-07-10 22:56:35.05 Server -T 3610
2006-07-10 22:56:35.05 Server -T 4010
2006-07-10 22:56:35.44 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2006-07-10 22:56:35.44 Server Detected 1 CPUs. This is an informational message; no user action is required.
2006-07-10 22:56:35.47 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2006-07-10 22:56:35.55 Server Database Mirroring Transport is disabled in the endpoint configuration.
2006-07-10 22:56:35.56 spid5s Warning ******************
2006-07-10 22:56:35.56 spid5s SQL Server started in single-user mode. This an informational message only. No user action is required.
2006-07-10 22:56:35.56 spid5s Starting up database 'master'.
2006-07-10 22:56:35.79 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2006-07-10 22:56:36.44 spid5s SQL Trace ID 1 was started by login "sa".
2006-07-10 22:56:36.50 spid5s Starting up database 'mssqlsystemresource'.
2006-07-10 22:56:37.25 Server Error: 26011, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server The server was unable to initialize encryption because of a problem with a security library. The security library may be missing. Verify that security.dll exists on the system.
2006-07-10 22:56:37.25 Server Error: 17182, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server TDSSNIClient initialization failed with error 0x139f, status code 0x80.
2006-07-10 22:56:37.25 Server Error: 17182, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server TDSSNIClient initialization failed with error 0x139f, status code 0x1.
2006-07-10 22:56:37.25 Server Error: 17826, Severity: 18, State: 3.
2006-07-10 22:56:37.25 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2006-07-10 22:56:37.25 Server Error: 17120, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

|||OMG, guess what... It's installed SUCCESSFULLY again just now while I tried to figure out in which part it had failed. I sware I haven't done anything specially tonight. Well, difference, tonight I'm thinking seriously of re-install my Windows XP rather than looking for solutions as what I was doing in last few nights. Oh...don't juggle with me. I don't know who, Windows XP or SQL server 2005 express edition.|||

There certainly seemed to be some problems with the installation based on your log, but if it's installed and working that's probably well enough. Tought to say if your adware incident was the cause of this, or if the problems you're seeing are related to it.

I'd say leave it be for a week to see what happens before you consider re-install of Windows, but that's your call.

Mike

|||

Hi Mike

Thanks for your eye on my topic.

The service stopped again and refused being stared manually. I checked Configuration Manager, and both SQL Server and SQL Server Browser stopped.

The ERRORLOG has same content as above.

Then I changed login account in both services from Network Service to Local System, now they are running.

Monday, March 12, 2012

Failed in installatio, ERROR:29503

Hi, Folks

My story is a bit of similar to some of the fellows. During the default installation, it failed at the last section which is "SQL server database service" because it cannot start the SQL service.

The difference of my story is this is not the first time I install it on my computer or any upgrade from whatever other version. I'd installed it for a couple of weeks working perfectly before my computer seemingly infected by an adware. Since then SQL Server stopped working, then I decided to re-install it after I had the adware removed.

So it shouldn't be the limitation of either CPU or memory, I think. I hope I could get an answer to it before I have to re-install the whole OS, PAINFULLY.

CONTENT OF SUMMARY.LOG


Microsoft SQL Server 2005 9.00.1399.06
==============================
OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Time : Mon Jul 10 22:53:32 2006
Machine : YANG
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLSupport_1.log
--
Machine : YANG
Product : Microsoft SQL Server Native Client
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLNCLI_1.log
--
Machine : YANG
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SqlWriter_1.log
--
Machine : YANG
Product : MSXML 6.0 Parser
Product Version : 6.00.3883.8
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_MSXML6_1.log
--
Machine : YANG
Product : SQL Server Database Services
Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
--
Machine : YANG
Product : SQL Server Database Services
Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
--
Machine : YANG
Product : Microsoft SQL Server 2005 Express Edition
Product Version : 9.00.1399.06
Install : Failed
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQL.log
Last Action : InstallFinalize
Error String : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How

to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
The error is (1067) The process terminated

unexpectedly.
Error Number : 29503
--

SQL Server Setup failed. For more information, review the Setup log file in %ProgramFiles%\Microsoft SQL Server\90\Setup

Bootstrap\LOG\Summary.txt.


Time : Mon Jul 10 22:57:30 2006


List of log files:
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Core(Local).log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLSupport_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQLNCLI_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SqlWriter_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_MSXML6_1.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SQL.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Datastore.xml
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_.NET Framework 2.0.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SNAC.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Core.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_Support.log
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0022_YANG_SCC.log
c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

|||

CONTENT OF ERROR.LOG

2006-07-10 22:56:35.05 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

2006-07-10 22:56:35.05 Server (c) 2005 Microsoft Corporation.
2006-07-10 22:56:35.05 Server All rights reserved.
2006-07-10 22:56:35.05 Server Server process ID is 504.
2006-07-10 22:56:35.05 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-07-10 22:56:35.05 Server Registry startup parameters:
2006-07-10 22:56:35.05 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-07-10 22:56:35.05 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-07-10 22:56:35.05 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-07-10 22:56:35.05 Server Command Line Startup Parameters:
2006-07-10 22:56:35.05 Server -m SqlSetup
2006-07-10 22:56:35.05 Server SqlSetup
2006-07-10 22:56:35.05 Server -Q
2006-07-10 22:56:35.05 Server -q Chinese_PRC_CI_AS
2006-07-10 22:56:35.05 Server -T 4022
2006-07-10 22:56:35.05 Server -T 3659
2006-07-10 22:56:35.05 Server -T 3610
2006-07-10 22:56:35.05 Server -T 4010
2006-07-10 22:56:35.44 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2006-07-10 22:56:35.44 Server Detected 1 CPUs. This is an informational message; no user action is required.
2006-07-10 22:56:35.47 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2006-07-10 22:56:35.55 Server Database Mirroring Transport is disabled in the endpoint configuration.
2006-07-10 22:56:35.56 spid5s Warning ******************
2006-07-10 22:56:35.56 spid5s SQL Server started in single-user mode. This an informational message only. No user action is required.
2006-07-10 22:56:35.56 spid5s Starting up database 'master'.
2006-07-10 22:56:35.79 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2006-07-10 22:56:36.44 spid5s SQL Trace ID 1 was started by login "sa".
2006-07-10 22:56:36.50 spid5s Starting up database 'mssqlsystemresource'.
2006-07-10 22:56:37.25 Server Error: 26011, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server The server was unable to initialize encryption because of a problem with a security library. The security library may be missing. Verify that security.dll exists on the system.
2006-07-10 22:56:37.25 Server Error: 17182, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server TDSSNIClient initialization failed with error 0x139f, status code 0x80.
2006-07-10 22:56:37.25 Server Error: 17182, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server TDSSNIClient initialization failed with error 0x139f, status code 0x1.
2006-07-10 22:56:37.25 Server Error: 17826, Severity: 18, State: 3.
2006-07-10 22:56:37.25 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2006-07-10 22:56:37.25 Server Error: 17120, Severity: 16, State: 1.
2006-07-10 22:56:37.25 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

|||OMG, guess what... It's installed SUCCESSFULLY again just now while I tried to figure out in which part it had failed. I sware I haven't done anything specially tonight. Well, difference, tonight I'm thinking seriously of re-install my Windows XP rather than looking for solutions as what I was doing in last few nights. Oh...don't juggle with me. I don't know who, Windows XP or SQL server 2005 express edition.|||

There certainly seemed to be some problems with the installation based on your log, but if it's installed and working that's probably well enough. Tought to say if your adware incident was the cause of this, or if the problems you're seeing are related to it.

I'd say leave it be for a week to see what happens before you consider re-install of Windows, but that's your call.

Mike

|||

Hi Mike

Thanks for your eye on my topic.

The service stopped again and refused being stared manually. I checked Configuration Manager, and both SQL Server and SQL Server Browser stopped.

The ERRORLOG has same content as above.

Then I changed login account in both services from Network Service to Local System, now they are running.

Friday, February 17, 2012

Extract values from XML in a Strored Proc

I pass an xml to a Stored Proc similar to below.
How do I extaract the id and value from below XML?
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs><id>1</id><value>Costs</value><id>2</id><value>MarketPowerInfluence</value><value>IndustryStanding</value><value>SupplierRelations</value></MnemonicIDs>'
SELECT T.MnemonicIDs.value('/value', 'VARCHAR(50)'),
T.MnemonicIDs.value('/id', 'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)
You probably want:
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs>
<id>1</id><value>Costs</value>
<id>2</id><value>MarketPowerInfluence</value><value>IndustryStanding</value>
<value>SupplierRelations</value>
</MnemonicIDs>'
SELECT T.MnemonicIDs.value('.', 'VARCHAR(50)'),
T.MnemonicIDs.value('(for $v in . return ../id[. << $v])[last()]',
'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs/value') AS T(MnemonicIDs)
However, if you can change the XML structure to something like:
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs>
<id>1</id><value>Costs</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>MarketPowerInfluence</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>IndustryStanding</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>SupplierRelations</value>
</MnemonicIDs>'
then the query becomes simpler:
SELECT T.MnemonicIDs.value('value[1]', 'VARCHAR(50)'),
T.MnemonicIDs.value('id[1]', 'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)
Best regards
Michael
"C" <C@.discussions.microsoft.com> wrote in message
news:BCFF9712-A442-42E9-9F7F-E686F65137D0@.microsoft.com...
>I pass an xml to a Stored Proc similar to below.
> How do I extaract the id and value from below XML?
>
> DECLARE @.piMnemonicIDs xml
> SET @.piMnemonicIDs =
> '<MnemonicIDs><id>1</id><value>Costs</value><id>2</id><value>MarketPowerInfluence</value><value>IndustryStanding</value><value>SupplierRelations</value></MnemonicIDs>'
> SELECT T.MnemonicIDs.value('/value', 'VARCHAR(50)'),
> T.MnemonicIDs.value('/id', 'VARCHAR(50)')
> FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)
>

Extract values from XML in a Strored Proc

I pass an xml to a Stored Proc similar to below.
How do I extaract the id and value from below XML?
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs><id>1</id><value>Costs</value><id>2</id><value>MarketPowerInfl
uence</value><value>IndustryStanding</value><value>SupplierRelations</value>
</MnemonicIDs>'
SELECT T.MnemonicIDs.value('/value', 'VARCHAR(50)'),
T.MnemonicIDs.value('/id', 'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)You probably want:
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs>
<id>1</id><value>Costs</value>
<id>2</id><value>MarketPowerInfluence</value><value>IndustryStanding</value>
<value>SupplierRelations</value>
</MnemonicIDs>'
SELECT T.MnemonicIDs.value('.', 'VARCHAR(50)'),
T.MnemonicIDs.value('(for $v in . return ../id[. << $v])[last()]',
'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs/value') AS T(MnemonicIDs)
However, if you can change the XML structure to something like:
DECLARE @.piMnemonicIDs xml
SET @.piMnemonicIDs =
'<MnemonicIDs>
<id>1</id><value>Costs</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>MarketPowerInfluence</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>IndustryStanding</value>
</MnemonicIDs>
<MnemonicIDs>
<id>2</id><value>SupplierRelations</value>
</MnemonicIDs>'
then the query becomes simpler:
SELECT T.MnemonicIDs.value('value[1]', 'VARCHAR(50)'),
T.MnemonicIDs.value('id[1]', 'VARCHAR(50)')
FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)
Best regards
Michael
"C" <C@.discussions.microsoft.com> wrote in message
news:BCFF9712-A442-42E9-9F7F-E686F65137D0@.microsoft.com...
>I pass an xml to a Stored Proc similar to below.
> How do I extaract the id and value from below XML?
>
> DECLARE @.piMnemonicIDs xml
> SET @.piMnemonicIDs =
> '<MnemonicIDs><id>1</id><value>Costs</value><id>2</id><value>MarketPowerIn
fluence</value><value>IndustryStanding</value><value>SupplierRelations</valu
e></MnemonicIDs>'
> SELECT T.MnemonicIDs.value('/value', 'VARCHAR(50)'),
> T.MnemonicIDs.value('/id', 'VARCHAR(50)')
> FROM @.piMnemonicIDs.nodes('/MnemonicIDs') AS T(MnemonicIDs)
>