Showing posts with label source. Show all posts
Showing posts with label source. Show all posts

Thursday, March 29, 2012

Automating installation of ODBC data source

Is there a script anyone has that will automate the addition of an
access database to the OBDC datasources in control panel.

ThanksHere's something that I did in Kixtart for our environment. It was last
November, so I don't recall all the details. Some key values I would expect to
vary, as I have six (6) scripts for all the data sources we have. I figured out
what to do by checking the registry, and creating a script that would duplicate
what I had done manually.

Also, since it was three (3) PCs ago, I don't recall what OS it was. Since I've
been here, I've had three (3) PCs. This one is XP, the previous was w2k and the
first? MAY have been NT. I mention this as I don't know if it'll require any
changes in the script.

Here it is (between the lines of '=========='):
==========
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
; Kixtart script - create Data Source Entries for HTE applications ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
; ;
; 11-10-03 tcs initial creation date. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
;
; *** NOTE ***
;
; Path to 'cwbodbc.dll' must be modified as necessary. For example,
; as originally written, the path is:
;
; d:\IBM\Client Access\Shared\cwbodbc.dll
;
; which was correct for the machine upon which this script was developed.
;
;================================================= ====================
;
;Setup ODBC for HTE DB2 database [Begin]
;Create the necessary keys, values and expressions for current user.
$CR=chr(13)
$HteDSN='Finance'
$KeyBase='HKEY_CURRENT_USER\Software\ODBC\ODBC.INI '
$Key1='$KeyBase\ODBC Data Sources'
$Key2='$KeyBase\$HteDSN'
if existkey($Key2) ; key doesn't exist, so create it.
$result=addkey($Key2)
$result=writevalue($Key1,'$HteDSN','Client Access ODBC Driver
(32-bit)','REG_SZ')

$result=writevalue($Key2,'AllowDataCompression','0 ','REG_SZ')
$result=writevalue($Key2,'AllowUnsupportedChar','0 ','REG_SZ')
$result=writevalue($Key2,'AlwaysScrollable','0','R EG_SZ')
$result=writevalue($Key2,'BlockSizeKB','32','REG_S Z')
$result=writevalue($Key2,'CCSID','','REG_SZ')
$result=writevalue($Key2,'CommitMode','0','REG_SZ' )
$result=writevalue($Key2,'ConnectionType','0','REG _SZ')
$result=writevalue($Key2,'DateFormat','5','REG_SZ' )
$result=writevalue($Key2,'DateSeparator','1','REG_ SZ')
$result=writevalue($Key2,'Decimal','0','REG_SZ')
$result=writevalue($Key2,'DefaultLibraries','atlib , prlib, pilib, gmlib,
fmlib, mrlib, crlib, gflib, falib, wflib, lxlib, malib','REG_SZ')
$result=writevalue($Key2,'DefaultPkgLibrary','QGPL ','REG_SZ')
$result=writevalue($Key2,'Description','Client Access Express ODBC data
source','REG_SZ')
$result=writevalue($Key2,'Driver','d:\IBM\Client
Access\Shared\cwbodbc.dll','REG_SZ')
$result=writevalue($Key2,'ExtendedDynamic','0','RE G_SZ')
$result=writevalue($Key2,'ForceTranslation','0','R EG_SZ')
$result=writevalue($Key2,'LanguageID','ENU','REG_S Z')
$result=writevalue($Key2,'LazyClose','0','REG_SZ')
$result=writevalue($Key2,'LibraryView','0','REG_SZ ')
$result=writevalue($Key2,'ManagedDataSource','0',' REG_SZ')
$result=writevalue($Key2,'MaxFieldLength','32','RE G_SZ')
$result=writevalue($Key2,'Naming','0','REG_SZ')
$result=writevalue($Key2,'ODBCRemarks','0','REG_SZ ')
$result=writevalue($Key2,'PreFetch','0','REG_SZ')
$result=writevalue($Key2,'RecordBlocking','2','REG _SZ')
$result=writevalue($Key2,'SearchPattern','1','REG_ SZ')
$result=writevalue($Key2,'Signon','0','REG_SZ')
$result=writevalue($Key2,'SortSequence','0','REG_S Z')
$result=writevalue($Key2,'SortTable','','REG_SZ')
$result=writevalue($Key2,'SortWeight','0','REG_SZ' )
$result=writevalue($Key2,'SSL','2','REG_SZ')
$result=writevalue($Key2,'System','10.4.1.1','REG_ SZ')
$result=writevalue($Key2,'TimeFormat','0','REG_SZ' )
$result=writevalue($Key2,'TimeSeparator','0','REG_ SZ')
$result=writevalue($Key2,'TranslationDLL','','REG_ SZ')
$result=writevalue($Key2,'TranslationOption','','R EG_SZ')
$result=writevalue($Key2,'','','REG_SZ')
$result=writevalue($Key2,'','','REG_SZ')
$result=writevalue($Key2,'','','REG_SZ')
$result=writevalue($Key2,'','','REG_SZ')
endif
;Setup ODBC for HTE DB2 Server [End]
==========
I don't think that I fully finished, so I'd tread lightly, but hopefully this'll
get you started.

Tom

On Wed, 23 Jul 2003 10:49:53 +0000 (UTC), SkunkDave
<dave_casserly@.totalise.co.uk> wrote:

>Is there a script anyone has that will automate the addition of an
>access database to the OBDC datasources in control panel.
>Thanks

Tuesday, March 20, 2012

Automatic synchronization of lookup columns


Data Flow:

Step 1: I use a OleDb Source Task to read data from a table (say table A) with 5 columns.

Step 2: Then I use a lookup task to add a sixth column (resulting from lookup on table B).

Step 3: Then I save the 6 columns to table C using a OleDb Destination Task.

Now, I go to underlying database and modify the tables like:

- remove 1 column from table A (not the column used for lookup later).
- remove 1 column from table B (not the columns used for lookup and not the columns retrieved after lookup)
- remove 1 column from table C (same as the one removed from table A).

If I get back to SSIS designer, it is nice enough to show warnings and ask whether I want to fix the metadata mismatch automatically. But, it does this for OleDb Source and Destination tasks only and NOT for lookup task. If I open the lookup task and hit the columns tab, it still shows old coulmn set for table B. It will be nice if these can be fixed automatically too. Or is it too much to ask for?

thanks,
Nitesh

Yes it'd be nice :)
You will notice similar behaviors also in other trasformations in the data flow (like Union All eg.). If you modify the structure of your data sources, you do need to check almost all of the sources, tasks and destinations involved.
Some months ago i asked in the beta place for a "Synchronize All" botton in the Data Flow editor form. But perhaps there will be better solutions then mine.
|||

Can you open a DCR for this?

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 PROCESS

Hi

Currentyl after i transfer the data from another database(source) to datawarehouse. I need to click on the "process" button in order to see the latest result. Do it have a command or way to do it programmatically or using the SSIS to do it?

Anyone please point me the link for me to do the automate process ?

Thanks in advance for anyone provide me some clue.

There are plenty of different options

SSIS has an SSAS processing task.

You could script the processing from SSMS as an XML/A command and schedule it from SQL Agent or using the ascmd sample that was released with SP2.

You could write a .Net app using the AMO to initiate the processing.

|||

Hi Darren,

You again Smile . And thank again for the pointing.

And i found more details explaination on this,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=230156&SiteID=1

Just provide for those are interested. And is worked and simple.

Thanks

|||Yep me again . That's exactly what I had in mind.