Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Thursday, March 29, 2012

Automating File Deployment of SSIS Packages

Hi:

I am trying to utilize DTUtil command to automate deployment of SSIS Package from the Build Server to Dev Server. I am getting an invalid option error, when I try to run the following command:

dtutil /FILE C:\Program Files\ABC\ABC ABC CAD\ETL Packages\Load_Staging_FromWCF.dtsx /MOVE FILE;\\serverA\C$\Program Files\ABC\ABC ABC CAD\ETL Packages\Load_Staging_FromWCF.dtsx /QUIET

Currently I have a .CMD file, in which I have the above command, and I am trying to run the CMD file and it returns an error. Can someone help me the DTUtil switches. My goal is to move a DTSX file from Server A(Build Server) to Server B(Dev Server). Also is there a switch to specify the server name, if UNC path is not supported. Also I am using File System Deployment, and running the file as an Administrator. I have admin privs on both Build and Dev Server. Thanks and I appreciate some help on this.

Why not just copy the package files over there using regular COPY commands?|||

That is true, because I am not actually utilizing SQL Server Deployment switches, although DTUtil does allow moving package files, just not sure what switches to apply. Thanks.

Wednesday, March 7, 2012

automate way to build an odbc connection

is there is an automate way to build an odbc connection without usin the
windows "odbc data source administrator"?
thanks
You can programmatically create DSNs - they are just
registry entries really. Most of the examples you can find
just write to the registry. Here are a couple of samples
that should have enough information to get you going:
How To Programmatically Create a DSN for SQL Server with VB
http://support.microsoft.com/?id=184608
How to Create ODBC DSN on multiple SQL server machines
http://www.databasejournal.com/featu...le.php/2238221
-Sue
On Thu, 28 Sep 2006 15:23:24 +0200, "Sam"
<focus10@.zahav.net.il> wrote:

>is there is an automate way to build an odbc connection without usin the
>windows "odbc data source administrator"?
>thanks
>

automate way to build an odbc connection

is there is an automate way to build an odbc connection without usin the
windows "odbc data source administrator"?
thanksYou can programmatically create DSNs - they are just
registry entries really. Most of the examples you can find
just write to the registry. Here are a couple of samples
that should have enough information to get you going:
How To Programmatically Create a DSN for SQL Server with VB
http://support.microsoft.com/?id=184608
How to Create ODBC DSN on multiple SQL server machines
http://www.databasejournal.com/feat...cle.php/2238221
-Sue
On Thu, 28 Sep 2006 15:23:24 +0200, "Sam"
<focus10@.zahav.net.il> wrote:

>is there is an automate way to build an odbc connection without usin the
>windows "odbc data source administrator"?
>thanks
>

Automate the configuration of the Query Log

Hi

I am looking at automating an AS 2005 build which will include setting up the Query Log. Can this step be automated.

Thanks

There are a couple of server properties for QueryLog settings (you can see all of them with SQL Management Studio: right click on the server item, chose 'Properties' and look for 'Log \ QueryLog' items). The query log settings are per entire server.

To automate setting up query log settings, here are some options:


1. Script the Server Properties dialog (from SQL Management Studio - the dialog has a 'Script' button at the top) and then run the script with an Integration Services task or with AMO. You can remove from the script all the other server properties that you don't want to touch (keeping the script small, clear and safe).

To run the script with AMO, this is sample C# code:

(in your C# project, add a reference to Microsoft.AnalysisServices.DLL from '%ProgramFiles%\Microsoft SQL Server\90\SDK\Assemblies')

...
using Microsoft.AnalysisServices;
...

Server s = new Server();

s.Connect("localhost");

try
{
XmlaResultCollection results = s.Execute("Put here the script copy-pasted from SQL Management Studio");

foreach (XmlaResult result in results)
{
foreach( XmlaMessage message in result.Messages )
{
Console.WriteLine(message.Description);
if (message is XmlaError)
{
// FAILURE: the script failed, you need to do something here
}
}
}
}
finally
{
s.Disconnect();
}

2. Use AMO to change the server properties. Sample code:

...
using Microsoft.AnalysisServices;
...

Server s = new Server();

s.Connect("localhost");

try
{
ServerProperty sp;

// setup the query log file path
sp = s.ServerProperties[@."Log\QueryLog\QueryLogFileName"]; // this throws exception if lookup fails
sp.Value = @."c:\MyQueryLog.txt";

// setup the query log file size
sp = s.ServerProperties[@."Log\QueryLog\QueryLogFileSize"]; // this throws exception if lookup fails
sp.Value = "10"; // 10 MB

// Now save everything; the properties we set don't require server restart.
s.Update();
}
finally
{
s.Disconnect();
}

Adrian Dumitrascu

|||

Adrian

Cheers i'll give it a try.