SQL Server Data Pull with "dot" in database name

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
TNZL_BI
Premium Member
Premium Member
Posts: 24
Joined: Mon Aug 20, 2012 5:15 am
Location: NZ

SQL Server Data Pull with "dot" in database name

Post by TNZL_BI »

Hi All,
We are on datastage v9.1 and trying to pull data from SQL Server. Connectivity has been established successfully via .odbc.ini and uvconfig.

Target SQL server is hosting five different databases on it out of which 4 has "dot" in their name while one has "underscore".

We are able to fetch data successfully from the database having name with underscore in it however no luck with database having dot in its name

So fully qualified table name looks like this

[string1.string2].dbo.[tablename]

In this [string1.string2] is database name, dbo is schema

What we have tried so far
1. Adding database name in .odbc.ini configuration itself which did not work - It fails connectivity with "can not open database"
2. Using query as select * from [string1.string2].dbo.[tablename] - This with many other combinations always yields result as "Invalid object Name"

Any pointers on this will be much appreciated. We are using ODBC connector stage at this moment

Thanks
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

That is probably an illegal name (or at least ill advised) because the "dot" is a special character in used to separate the schema from the database name.

If you can't change the name, then setup a database alias (without the dots) that DataStage can use.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
TNZL_BI
Premium Member
Premium Member
Posts: 24
Joined: Mon Aug 20, 2012 5:15 am
Location: NZ

Post by TNZL_BI »

Thanks for your suggestion. Our DBA has helped us in creating new database instance and he is populating required tables using a stored proc from orignal database having "dot" in its name.

So this resolves it..a workaround though :)
Post Reply