Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Friday, February 24, 2012

DtExec: setting user-defined properties with whitespace?

Hi there.

I'd like to call dtexec with something like this:

dtexec /f myPackage.dtsx /Set \package.variables[User::connStr].Value;Source=localhost;Provider=blah;Integrated Security=SSPI;

I get an error along the lines of

Option "Source=localhost;Provider=blah;Integrated" is not valid".

How do I pass in a property containing spaces? I've tried all of the usual quote-encasing patterns I can think of.

Thanks,

Jon

JonB_QRM wrote:

Hi there.

I'd like to call dtexec with something like this:

dtexec /f myPackage.dtsx /Set \package.variables[User::connStr].Value;Source=localhost;Provider=blah;Integrated Security=SSPI;

I get an error along the lines of

Option "Source=localhost;Provider=blah;Integrated" is not valid".

How do I pass in a property containing spaces? I've tried all of the usual quote-encasing patterns I can think of.

Thanks,

Jon

Double quotes.

dtexec /f myPackage.dtsx /Set \package.variables[User::connStr].Value;"Source=localhost;Provider=blah;Integrated Security=SSPI;"|||

Thanks for getting back so quickly. Your suggestion worked for a date string passed in as a property, but not a connection string.

When I run

dtexec /f package.dtsx /Set \package.variables[User::effectiveDate].Value;"2007-04-30 09:00" /Set \package.variables[User::connStr].Value;"Data Source=localhost\2005;Initial Catalog=QRMDB1_MRKT_SVC;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"

I get the following complaint:

Argument ""\package.variables[User::connStr].Value;Data Source=localhost\2005;Initial Catalog=QRMDB1_MRKT_SVC;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"" for option "set" is not valid

It doesn't complain about the quotes around the date value.

Thoughts?

|||As an aside, if I write these props to a file and specify it using the /Com <filename> switch, dtexec takes them.|||

you may need a backslash to escape the double quotes.

Try this:

/Set \package.variables[User::connStr].Value;\"Data Source=localhost\2005;Initial Catalog=QRMDB1_MRKT_SVC;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;\"

Friday, February 17, 2012

DTC & SQL Server 2000 Security

Perhaps someone can answer this question. I was given a document from a Microsoft consultant and setting up a secure SQL Server 2000 server for my company. This document is being used to setup standards for our enterprise implementation of SQL Servers.

In the document, it has a procedure of disabling the MSDTC service stating that, "the DTC can be used by COM+ applications to manage transactions across multiple database servers." But it really doesn't suffieniently state why this is a good security practice. Can anyone out there tell me why this is a good idea.

Background: We use the Standard Edition, and currently have no distributed servers out there, nor do we have replication. A side note, just recently we have been asked to install a replicated server for fail-over capability. Will disabling the DTC service hinder us?

gpl :-)

Replication will only be affected if you have Immediate Updating subscriptions to transactional publications. Immediate Updating subscribers require MSDTC, since it's a 2 phase commit transaction relying on MSDTC service running.

Tuesday, February 14, 2012

DSN-less connection

I am looking to try and connect to SQL Server via a DSN-less
connection in a VB application.
Setting up ODBC data sources is a headache for each user workstation.
There has to be an easier way.
Is there a straight forward way to do that or do you know a good
reference source that would have information on this topic?

Thank you.RLN (rlntemp-newsgroup@.yahoo.com) writes:

Quote:

Originally Posted by

I am looking to try and connect to SQL Server via a DSN-less
connection in a VB application.
Setting up ODBC data sources is a headache for each user workstation.
There has to be an easier way.
Is there a straight forward way to do that or do you know a good
reference source that would have information on this topic?


What is the problem?

What means of authentication do you use? SQL Server authentication or
Windows authentication? Is the server always the one and the same? What is
the database?

Our application addresses all these problems by prompting the user. Isn't
that feasible for you?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx