Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Thursday, March 22, 2012

Escape character for /SET option of dtexec

I have a problem setting some variables in a package using the /SET option of dtexec. Specifically when the value I want to set contains a semi-colon. I get an error like:

Argument ""\Package.Variables[User::Delim].Properties[Value];^;"" for option "set" is not valid.

I am guessing that I will have to escape the semi-colons somehow, but with what?

Regards,
Lars

You don't show the command but from the error it looks like

/set "\Package.Variables[User::Delim].Properties[Value];^;"

instead try

/set "\Package.Variables[User::Delim].Properties[Value]";"^;"

This puts the semicolon separator outside the quotes and may allow DTExec to process the argument.

HTH,

Matt

|||

Matt,

I am afraid that didn't work either. Any other ideas of how to pass a string containing semi-colons to dtexec using the command line?

This is the output:
H:\>dtexec /SET "\Package.Variables\[User::TheVariable].Properties[Value]";"^;"
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Argument ""\Package.Variables\[User::TheVariable].Properties[Value];^;"" for opt
ion "set" is not valid.

H:\>

Regards,
Lars

|||

Sorry I should have been more explicit in my posting. You should try:

dtexec /SET "\"\Package.Variables\[User::TheVariable].Properties[Value]\";\"^;\""

The command interpreter strips quotes so the command I showed previously was what DTExec would work with but you have to escape the quotes so that they get to the DTExec parser. The above shows the actual command line with all the escaping.

HTH,

Matt

|||

The following turned out to be the proper syntax:

dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\"^;\"

Regards,
Lars

|||

The above did not work when the string contained spaces. The following has yet not failed though:

dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\""; space"\"

Regards,
Lars

Escape character for /SET option of dtexec

I have a problem setting some variables in a package using the /SET option of dtexec. Specifically when the value I want to set contains a semi-colon. I get an error like:

Argument ""\Package.Variables[User::Delim].Properties[Value];^;"" for option "set" is not valid.

I am guessing that I will have to escape the semi-colons somehow, but with what?

Regards,
Lars

You don't show the command but from the error it looks like

/set "\Package.Variables[User::Delim].Properties[Value];^;"

instead try

/set "\Package.Variables[User::Delim].Properties[Value]";"^;"

This puts the semicolon separator outside the quotes and may allow DTExec to process the argument.

HTH,

Matt

|||

Matt,

I am afraid that didn't work either. Any other ideas of how to pass a string containing semi-colons to dtexec using the command line?

This is the output:
H:\>dtexec /SET "\Package.Variables\[User::TheVariable].Properties[Value]";"^;"
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Argument ""\Package.Variables\[User::TheVariable].Properties[Value];^;"" for opt
ion "set" is not valid.

H:\>

Regards,
Lars

|||

Sorry I should have been more explicit in my posting. You should try:

dtexec /SET "\"\Package.Variables\[User::TheVariable].Properties[Value]\";\"^;\""

The command interpreter strips quotes so the command I showed previously was what DTExec would work with but you have to escape the quotes so that they get to the DTExec parser. The above shows the actual command line with all the escaping.

HTH,

Matt

|||

The following turned out to be the proper syntax:

dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\"^;\"

Regards,
Lars

|||

The above did not work when the string contained spaces. The following has yet not failed though:

dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\""; space"\"

Regards,
Lars

sql

Escape Character

Does anyone know if there is an escape sequnce you can use in Report
Definition Language? Some data I'm including inside of a tag contains the
'>' character, and it appears to be confusing things. I'd like to retain that
character by escaping it.
Thanks.Have you installed SP1? I can include the character without trouble...
"Darin" wrote:
> Does anyone know if there is an escape sequnce you can use in Report
> Definition Language? Some data I'm including inside of a tag contains the
> '>' character, and it appears to be confusing things. I'd like to retain that
> character by escaping it.
> Thanks.|||Ok, I typed the wrong character. It is the '<' character, not the '>'
character.
Yes I have SP1 installed.
"Mary Bray [SQL Server MVP]" wrote:
> Have you installed SP1? I can include the character without trouble...
> "Darin" wrote:
> > Does anyone know if there is an escape sequnce you can use in Report
> > Definition Language? Some data I'm including inside of a tag contains the
> > '>' character, and it appears to be confusing things. I'd like to retain that
> > character by escaping it.
> >
> > Thanks.

Wednesday, March 7, 2012

ErrorLog size limit

Hi.

I have a service on a server which contains Sql Server Express.

this service adds documents to the database to allow full text search features.

From some reason, the index crashes and than it writes to the ErrorLog file, the errorlog jumps to 20GB(!) causing the server to crash.

How can :

1. limit the size of the error log.

2. find out why the log jumps to this size (I can't open the error log file ofcourse...)

Thanks!

hi,

if you are refererring to transaction log you can you the alter database command

GO

ALTER DATABASE [Northwind] MODIFY FILE ( NAME = N'Northwind_log', MAXSIZE = 1024000KB )

GO

Regards,

joey

ErrorColumn field from Datasource Error Output

Hi,

The problem is, ErrorColumn contains ID. Is the following code reference safe ?
columnname = Me.ComponentMetaData.InputCollection.FindObjectByID(Row.ErrorColumn).Name

Is there any possibility for FindObjectByID to return NULL Reference in any case ?In many cases ErrorColumn is NULL.|||It contains ID, how do I translate it to Column Name ?
I have defined names in connection manager.|||I don't believe you can.|||Why I couldnt ?

That sucks|||

Fahad349 wrote:

Why I couldnt ?

That sucks

Because the column ID is the metadata ID of the column in the previous component, not the current component. So the ID being passed in isn't in the current component's metadata.

Indeed it isn't the best situation.

|||Dang on SQL Server team

Is there any harder way to do it ?|||

Fahad349 wrote:

Dang on SQL Server team

Is there any harder way to do it ?

You are welcome to submit a feature request: http://connect.microsoft.com/sqlserver/feedback

Wednesday, February 15, 2012

Error: SQL server failed to communicate with Full-Text Service

Hello,

I've enabled full-text indexing on one of my tables, and the following query used to work:

SELECT *
FROM TempAttachment
WHERE CONTAINS(attachment, 'text')

However, now I get the following error:

Msg 9955, Level 16, State 1, Line 1SQL server failed to communicate with Full-Text Service (msftesql). The system administrator must make sure that same service account is used for both services and the service account has the permission to auto start the full-text service.

I've checked the configuration and verified that both accounts are the same. I've restarted the services, and tried rebooting, and still no luck. I did a search on this error, and found this page from MSDN, which doesn't help me much: http://msdn2.microsoft.com/en-us/library/aa337365.aspx.

Has anybody come across this before? Any help would be greatly appreciated!

Just want to be sure, which 2 services' account did you update?

|||

Thanks for your reply.

I didn't update any settings. I went to SQL Server Configuration Manager and selected "SQL Server 2005 Services" on the left menu. On the right side, I right-clicked and viewed properties of "SQL Server FullText Search" and "SQL Server". They both have the same log-on account (Local System).

This morning, I tried to back up my database and got a clue about this issue when the back up failed. It says "The backup of full-text catalog is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online..." I searched the error logs for my table name and didn't find anything (other than the backup failing because of it). Any ideas? Thanks.

|||

Okay, I found the problem!

Somehow, I didn't have permissions to the directory where the full-text data was being stored. (I'm unclear on how this happened - maybe someone else can reply if they have an idea?)

First, run the following query to find the path to your full-text catalog:

SELECT * FROM sysfulltextcatalogs

Then check the permissions for the directory or directories identified.