Page 1 of 1

SQL Server Data Pull with "dot" in database name

Posted: Fri Apr 08, 2016 3:12 pm
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

Posted: Fri Apr 08, 2016 3:26 pm
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.

Posted: Mon Apr 11, 2016 3:59 pm
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 :)