Showing posts with label stuck. Show all posts
Showing posts with label stuck. Show all posts

Wednesday, March 21, 2012

Problem Passing Text/NText to sp_xml_preparedocument

I'm stuck, this (the code below) should work, but it doesn't. Why? Is there
another way to do this that I should use instead?
Declare @.Hand1 as int
Declare @.ptrval varbinary(16)
Declare @.Length integer
Select @.ptrval = TEXTPTR(DEV_409.Doc.DocTxt),
@.Length = DataLength(DEV_409.Doc.DocTxt)
from DEV_409.Doc where DEV_409.Doc.DocID = 11320
/* NOTE: dbo.tbl_Documents.DocTxt is a field of data type of TEXT containing
a well formed XML document. */
/* The following statement fails with the error message <<Incorrect syntax
near the keyword 'READTEXT'.>> */
Exec sp_xml_preparedocument @.Hand1 OUTPUT, READTEXT DEV_409.Doc.DocTxt
@.ptrval 0 @.LengthHow can I parse XML from a text column using sp_xml_preparedocument?
http://www.sqlxml.org/faqs.aspx?faq=42
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Ed Lippert" <lippert@.mn.rr.com> wrote in message
news:OI7PEAsBEHA.3348@.TK2MSFTNGP11.phx.gbl...
> I'm stuck, this (the code below) should work, but it doesn't. Why? Is
there
> another way to do this that I should use instead?
> Declare @.Hand1 as int
> Declare @.ptrval varbinary(16)
> Declare @.Length integer
> Select @.ptrval = TEXTPTR(DEV_409.Doc.DocTxt),
> @.Length = DataLength(DEV_409.Doc.DocTxt)
> from DEV_409.Doc where DEV_409.Doc.DocID = 11320
> /* NOTE: dbo.tbl_Documents.DocTxt is a field of data type of TEXT
containing
> a well formed XML document. */
> /* The following statement fails with the error message <<Incorrect syntax
> near the keyword 'READTEXT'.>> */
> Exec sp_xml_preparedocument @.Hand1 OUTPUT, READTEXT DEV_409.Doc.DocTxt
> @.ptrval 0 @.Length
>|||The code you referenced is a poor kludge. While it may work in some cases, e
ven with obvious modifications it is not a universal solution (and won't wor
k in my specific appliocation) and is really unelegant.
There's got to be a better solution. MS states that the sp_xml_preparedocume
nt proc will accept text and ntext, so they must have had a way to accomplis
h it, if for no other reason than they had to test it.|||Hello Ed,
Thank you for posting in the community.
I understand you'd like to retrieve the Text/NText data with READTEXT
and pass the result as the second "xmltext" parameter of the
sp_xml_preparedocument.
BOL says:
[xmltext]
Is the original XML document. The MSXML parser parses this XML
document. xmltext is a text (char, nchar, varchar, nvarchar, text, or ntext
)
parameter. The default value is NULL, in which case an internal
representation of an empty XML document is created.
We can see that [xmltext] is a text parameter, which can be text or ntex
t data
type. However, it cannot be a batch statement "READTEXT DEV_
409.Doc.DocTxt @.ptrval 0 @.Length". Hence, SQL Server will issue a
Incorrect syntax error.
In my view, Jasper has lighted you on the right way. The solution to this
problem is to execute the statement dynamically. If the text length is short
er
than 8000 characters, you can use the following method directly.
----
--
CREATE PROC textproc
@.atext TEXT
AS
DECLARE @.hdoc int
EXEC sp_xml_preparedocument @.hdoc OUTPUT, @.atext
EXEC sp_xml_removedocument @.hdoc
GO
-- Sample XML document
EXEC textproc '
<ROOT>
<Customer CustomerID="VINET" ContactName="Paul Henriot">
<Order CustomerID="VINET" EmployeeID="5" OrderDate="1996-07-
04T00:00:00">
<OrderDetail OrderID="10248" ProductID="11" Quantity="12"/>
<OrderDetail OrderID="10248" ProductID="42" Quantity="10"/>
</Order>
</Customer>
<Customer CustomerID="LILAS" ContactName="Carlos Gonzlez">
<Order CustomerID="LILAS" EmployeeID="3" OrderDate="1996-08-
16T00:00:00">
<OrderDetail OrderID="10283" ProductID="72" Quantity="3"/>
</Order>
</Customer>
</ROOT>'
----
--
If it goes beyond 8000 characters, you need to kludge the string and
execute it for batch processing. Other than this, there is an open DCR to
enhance the functionality of the SP_XML_PREPAREDOCUMENT to allow
for the functionality that you are looking for.
Let us know if you have further questions. Thanks again for participating in
our community.
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

Wednesday, March 7, 2012

problem installing sql server express

help i'm having serious problems installing sql server express and quite at a loss.

i'm stuck at SQL Server Database Services and at Setting File Security. Can someone help? Seeing the SQL Server Database Services log i get this:

Action start 22:25:56: Write_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2.
<Func Name='LaunchFunction'>
Function=Write_sqlUserSecurity
<Func Name='SetCAContext'>
<EndFunc Name='SetCAContext' Return='T' GetLastError='203'>
Doing Action: Write_sqlUserSecurity
PerfTime Start: Write_sqlUserSecurity : Thu Dec 01 22:25:56 2005
<Func Name='Write_sqlUserSecurity'>
<Func Name='ScheduleActionX'>
<Func Name='SetCAContext'>
MSI (s) (44!E8) [22:25:56:417]: PROPERTY CHANGE: Adding Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2 property. Its value is '0 1 0 Setting User Security 50000 SQLServer2005SQLBrowserUser$ZSG03-1030 SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeBatchLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeAssignPrimaryTokenPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeChangeNotifyPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeIncreaseQuotaPrivilege '.
MSI (s) (44!E8) [22:25:56:417]: Doing action: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2
<EndFunc Name='SetCAContext' Return='T' GetLastError='0'>
Action start 22:25:56: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2.
MSI (s) (44!E8) [22:25:56:417]: PROPERTY CHANGE: Deleting Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2 property. Its current value is '0 1 0 Setting User Security 50000 SQLServer2005SQLBrowserUser$ZSG03-1030 SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeBatchLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeAssignPrimaryTokenPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeChangeNotifyPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeIncreaseQuotaPrivilege '.
Action ended 22:25:56: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 1.
<EndFunc Name='ScheduleActionX' Return='0' GetLastError='0'>
<EndFunc Name='Write_sqlUserSecurity' Return='0' GetLastError='0'>
PerfTime Stop: Write_sqlUserSecurity : Thu Dec 01 22:25:56 2005
<EndFunc Name='LaunchFunction' Return='0' GetLastError='0'>
MSI (s) (44:E4) [22:25:56:433]: Doing action: Write_sqlFileSDDL.D20239D7_E87C_40C9_9837_E70B8D4882C2
Action ended 22:25:56: Write_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 1.
MSI (s) (44:DC) [22:25:56:448]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIED.tmp, Entrypoint: Write_sqlFileSDDL
Action start 22:25:56: Write_sqlFileSDDL.D20239D7_E87C_40C9_9837_E70B8D4882C2.
<Func Name='LaunchFunction'>
Function=Write_sqlFileSDDL
<Func Name='SetCAContext'>
<EndFunc Name='SetCAContext' Return='T' GetLastError='203'>
Doing Action: Write_sqlFileSDDL
PerfTime Start: Write_sqlFileSDDL : Thu Dec 01 22:25:56 2005

I'm having the same problem installing SQL 2005 Enterprise Edtion. Once it gets to the "Setting File Security...", it just sits there hung. The only way to kill it is using the Task Manager.

It also looked like it was hung during "Installing Local Goups", but after 30 minutes or so, it moved on.

Hopefully someone from Microsoft can help us out!!!

|||... I'm having the same problem with the developer edition :(|||PROBLEM SOLVED : (?) Well, I think. I still need to test, but at least the install finished without error. Yesterday, I started the install at 2:46 PM and just let it run. Almost 8 hours later at 10:33 PM it finished.

I only installed the SQL Server. I'll start the install for the services now and get back to you later when it finishes. It shouldn't take more than a few days! Tongue Tied|||Good news, it only took 3.5 more hours to install all the services. Yes, it looked like it was hung there a few times, but I just let it go. Big Smile|||There is a workaround documented at
http://support.microsoft.com/?kbid=910070

-Jeffrey Baker
SQL Server Setup|||

Or simply disable your network temporarily if you are not installing from a network drive. Works like a charm !

Visit : http://sqljunkies.com/WebLog/simons/archive/2007/06/01/SQL_2005_install_hangs_on__Setting_File_Security_.aspx

SQL 2005 install hangs on &quot;Setting File Security&quot;

When doing an install of SQL 2005 you may encounter the install hanging on the "setting file security" stage.

This is due to th install trying to do some security resolution with domain controllers.

The easiest answer is to unplug the network cable (or disable the network interface), however if you are doing a remote install that may not be possible.

This KB discusses the issue http://support.microsoft.com/kb/910070/en-us and does provide hotfix which can be applied to the install so you don't encounter the problem

problem installing sql server express

help i'm having serious problems installing sql server express and quite at a loss.

i'm stuck at SQL Server Database Services and at Setting File Security. Can someone help? Seeing the SQL Server Database Services log i get this:

Action start 22:25:56: Write_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2.
<Func Name='LaunchFunction'>
Function=Write_sqlUserSecurity
<Func Name='SetCAContext'>
<EndFunc Name='SetCAContext' Return='T' GetLastError='203'>
Doing Action: Write_sqlUserSecurity
PerfTime Start: Write_sqlUserSecurity : Thu Dec 01 22:25:56 2005
<Func Name='Write_sqlUserSecurity'>
<Func Name='ScheduleActionX'>
<Func Name='SetCAContext'>
MSI (s) (44!E8) [22:25:56:417]: PROPERTY CHANGE: Adding Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2 property. Its value is '0 1 0 Setting User Security 50000 SQLServer2005SQLBrowserUser$ZSG03-1030 SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeBatchLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeAssignPrimaryTokenPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeChangeNotifyPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeIncreaseQuotaPrivilege '.
MSI (s) (44!E8) [22:25:56:417]: Doing action: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2
<EndFunc Name='SetCAContext' Return='T' GetLastError='0'>
Action start 22:25:56: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2.
MSI (s) (44!E8) [22:25:56:417]: PROPERTY CHANGE: Deleting Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2 property. Its current value is '0 1 0 Setting User Security 50000 SQLServer2005SQLBrowserUser$ZSG03-1030 SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeServiceLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeBatchLogonRight SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeAssignPrimaryTokenPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeChangeNotifyPrivilege SQLServer2005MSSQLUser$ZSG03-1030$SQLEXPRESS SeIncreaseQuotaPrivilege '.
Action ended 22:25:56: Do_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 1.
<EndFunc Name='ScheduleActionX' Return='0' GetLastError='0'>
<EndFunc Name='Write_sqlUserSecurity' Return='0' GetLastError='0'>
PerfTime Stop: Write_sqlUserSecurity : Thu Dec 01 22:25:56 2005
<EndFunc Name='LaunchFunction' Return='0' GetLastError='0'>
MSI (s) (44:E4) [22:25:56:433]: Doing action: Write_sqlFileSDDL.D20239D7_E87C_40C9_9837_E70B8D4882C2
Action ended 22:25:56: Write_sqlUserSecurity.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 1.
MSI (s) (44:DC) [22:25:56:448]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIED.tmp, Entrypoint: Write_sqlFileSDDL
Action start 22:25:56: Write_sqlFileSDDL.D20239D7_E87C_40C9_9837_E70B8D4882C2.
<Func Name='LaunchFunction'>
Function=Write_sqlFileSDDL
<Func Name='SetCAContext'>
<EndFunc Name='SetCAContext' Return='T' GetLastError='203'>
Doing Action: Write_sqlFileSDDL
PerfTime Start: Write_sqlFileSDDL : Thu Dec 01 22:25:56 2005

I'm having the same problem installing SQL 2005 Enterprise Edtion. Once it gets to the "Setting File Security...", it just sits there hung. The only way to kill it is using the Task Manager.

It also looked like it was hung during "Installing Local Goups", but after 30 minutes or so, it moved on.

Hopefully someone from Microsoft can help us out!!!

|||... I'm having the same problem with the developer edition :(|||PROBLEM SOLVED : (?) Well, I think. I still need to test, but at least the install finished without error. Yesterday, I started the install at 2:46 PM and just let it run. Almost 8 hours later at 10:33 PM it finished.

I only installed the SQL Server. I'll start the install for the services now and get back to you later when it finishes. It shouldn't take more than a few days! Tongue Tied|||Good news, it only took 3.5 more hours to install all the services. Yes, it looked like it was hung there a few times, but I just let it go. Big Smile|||There is a workaround documented at
http://support.microsoft.com/?kbid=910070

-Jeffrey Baker
SQL Server Setup|||

Or simply disable your network temporarily if you are not installing from a network drive. Works like a charm !

Visit : http://sqljunkies.com/WebLog/simons/archive/2007/06/01/SQL_2005_install_hangs_on__Setting_File_Security_.aspx

SQL 2005 install hangs on &quot;Setting File Security&quot;

When doing an install of SQL 2005 you may encounter the install hanging on the "setting file security" stage.

This is due to th install trying to do some security resolution with domain controllers.

The easiest answer is to unplug the network cable (or disable the network interface), however if you are doing a remote install that may not be possible.

This KB discusses the issue http://support.microsoft.com/kb/910070/en-us and does provide hotfix which can be applied to the install so you don't encounter the problem

Problem Installing SQL Mobile 2005 Tools

I'm trying to install the SQL Mobile 2005 Server tools on a Windows 2003
Server with IIS & MSSQL 2000 sp4.

I've stuck .NET 2.0 on already, but the installer for the server tools
Sqlce30setupen.msi just goes straight to the last page of the wizard and says
the install was interrupted.

I've run the install with logging turned on and this is the last portion of
the trace. Can anyone shed any light on whats going wrong.

-><-

MSI (c) (9C:14) [14:12:35:912]: Doing action: FindRelatedProducts
Action start 14:12:35: FindRelatedProducts.
Action ended 14:12:35: FindRelatedProducts. Return value 1.
MSI (c) (9C:14) [14:12:35:912]: Doing action: AppSearch
Action start 14:12:35: AppSearch.
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:912]: PROPERTY CHANGE: Adding IISROOTFOLDER
property. Its value is 'C:\Inetpub\wwwroot\'.
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\90\Tools\Shell\Services\{CA8A686A-0882-4e79-BCA3-AF3F3AB3EB8A} 3: 2
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:912]: PROPERTY CHANGE: Adding MDACFOUND property.
Its value is '2.80.1022.0'.
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:912]: PROPERTY CHANGE: Adding ISIISINSTALLED
property. Its value is 'LocalSystem'.
MSI (c) (9C:14) [14:12:35:912]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:912]: PROPERTY CHANGE: Adding SQL2KREPLCLIENT
property. Its value is '{2FAD19D0-E309-11D2-B6E5-00C04F688E8F}'.
MSI (c) (9C:14) [14:12:35:928]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (9C:14) [14:12:35:928]: Note: 1: 2262 2: Signature 3: -2147287038
Action ended 14:12:35: AppSearch. Return value 1.
MSI (c) (9C:14) [14:12:35:928]: Skipping action: CheckOSVersion (condition
is false)
MSI (c) (9C:14) [14:12:35:928]: Doing action: CA_CheckInstalledSQL
Action start 14:12:35: CA_CheckInstalledSQL.
MSI (c) (9C:94) [14:12:35:943]: Invoking remote custom action. DLL:
C:\DOCUME~1\Charlie\LOCALS~1\Temp\1\MSIB.tmp, Entrypoint: CheckInstalledSQL
MSI (c) (9C:88) [14:12:35:943]: Cloaking enabled.
MSI (c) (9C:88) [14:12:35:943]: Attempting to enable all disabled priveleges
before calling Install on Server
MSI (c) (9C:88) [14:12:35:943]: Connected to service for CA interface.
Action ended 14:12:36: CA_CheckInstalledSQL. Return value 3.
MSI (c) (9C:14) [14:12:36:005]: Doing action: SetupCompleteError
Action start 14:12:36: SetupCompleteError.
MSI (c) (9C:54) [14:12:36:082]: Note: 1: 2731 2: 0
Action ended 14:13:33: SetupCompleteError. Return value 2.
Action ended 14:12:32: INSTALL. Return value 3.
MSI (c) (EC:00) [14:19:35:619]: Destroying RemoteAPI object.
MSI (c) (EC:0C) [14:19:35:619]: Custom Action Manager thread ending.
=== Logging stopped: 11/01/2006 14:19:35 ===
MSI (c) (EC:34) [14:19:35:619]: Note: 1: 1708
MSI (c) (EC:34) [14:19:35:619]: Product: Microsoft SQL Server 2005 Mobile
[ENU] Server Tools -- Installation operation failed.

-><-

thanks

// charlie

Are you able to repro on any other machine? From log it appears to me that, MDAC, IIS, and SQL 2K are all detected and their properties are changed appropriately. Is that WIN2K3 is upto SP1? If it is so, then only one thing left is .NET FX 2.0. Did you install .NET FX 2.0 after running the MSI and realizing that you need .NET FX 2.0 inorder to proceed?

Try out on a fresh clean PC and let us know how things go there?

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||

From your posting http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=202038&SiteID=1, I understand that you were finally able to install the tools. By the way, what was the problem you faced and how did you resolve it?

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation