import from microsoft sql server

Jochen Peters j.peters at valentina-db.de
Fri Apr 27 08:45:56 CDT 2007


Hi Georgiu,

>> I do not understand this - you only can clone Valentina 2 databases -
>> not ODBC databases -
>> (at least not with vStudio).
> With what could I do that?
>
>> So - what you mean with cloning here?
> Look I am new to all this odbc-import/export thing. What I want to  
> do is to import the whole odbc database(structure and data) from ms  
> sql server to a valentina database.Is it possible? Importing the  
> structure and the data isn't a way(type) of cloning the db?
> Also (as I explain later) I would like to know if it is possible to  
> read the data from an odbc database like the functionality that  
> offers goldengate xtra (for director).

Aha - now i understand. Note that there is a special command for  
Valentina databases called "clone" - so i was confused here.
What you want is not cloning - it is importing, ok?

>
>> This happens during IMPORT?
>> Or during fetching of database structure?
> 1.During Connecting
> This happens when I connect, when it tries to fetch the database  
> structure. It fetches the tables and views correctly but it can't  
> fetch any results (meaning data?).
> After these errors the database appears (as an odbc datasource) but  
> when I try, for a table, to see the data (with open data editor)  
> the same error occurs .(If I do the same second time the valentina  
> studio crashes). So is it possible to fetch the data from an odbc  
> connection? Can studio do that or this happens only when using the  
> driver combined with a tool (like valentina for director, that is  
> what i want) or it is possible only with an xtra like goldengate?

Aha - i see. So you try to use Valentina Studio to browse the data in  
the ODBC datasource, right? Well - this is not official supported by  
Studio because there are tons of tools out there which can
browse ODBC datasources. Valentina Studio is build to focus on  
Valentina databases. It has only limited support for browsing ODBC  
datasources and this code is not
heavily maintained.

So - let's concentrate on importing.

>
>> Have you choosed to let Studio create all necessary tables for you?
> How do I do it?

When you use the Import Wizard it will automatically ask you for this  
if you choose to
create a new Valentina database.

>
>> Have you checked all new tables? Have you checked the field mappings
>> for each table?
>>
>> To isolate the problem it would be helpfull to know WHICH table and
>> WHICH fieldtypes causing it.
>> Maybe it is possibel to import the tables ONE by ONE to see which one
>> causes the trouble?
> 2.importing the odbc database
> So I try to import the database:
> When i call import i can see the views and tables and i get to a  
> screen asking me define the relationship between the fields of the  
> source database and the new(valentina) database. So I create a  
> table. Some fields get automatically the relationship with the  
> source field(like int becomes Long  and varchar becomes VarChar).  
> But for some fields that have types (like nvarchar) that exist only  
> in microsoft's transact's-sql language there exists no mapping.  
> Valetina Studio just ignores them. So do I have to create my own  
> mappings?How do I do that? For example, if i have a table with 5  
> fileds of type int,varchar,int,nvarchar,nvarchar then after  
> creating the table there are 3 fields with Long,VarChar,Long types  
> and no nvarchar slots.
I see - so some fields are not mapped correctly. Hhmm - i guess that  
these mappings must aditional coded.
You can try another way:

After creation of all tables and fields just cancel the Import  
Wizard. Then restart Valentina Studio and open the newly created  
database.
Then add by hand all the missing fields in the tables.

Then again start the Import Wizard with this database open. Do not  
choose to create a new database - just use
the open one. Then step by step select each table and do the  
necessary mappings by dragging and droping the corresponding fields.

Maybe this helps - but i am not sure if during the import all will  
work right for this unsupported field types - the problem is that  
Valentina Studio
do not know the type nvarchar - so it simply ignores it, i guess.

>
>
>> And what "side tables" ?
> Sorry, my mistake, It was the views that I thought were additional  
> tables
Ok.

>
>
>> Another possibility to import data is to export them first to text-
>> files and importing these text-files using Valentina Studio#s Import
>> Wizard.

What about this way? It is much easier because in case of text files  
the field types do not matter any more.
So - for your scenario i recommend to try text file import.

>
>> -- 
>> Best regards,
>> Jochen Peters
>> PIIT GmbH
>
>> ------------------------------------
>> http://www.valentina-db.de
>
> Thank you for your fast response and sorry for my english,

Well - mine is not very much better :-)


> Kostas
> <winmail.dat>
> _______________________________________________
> Valentina-studio mailing list
> Valentina-studio at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-studio



-- 
Best regards,
Jochen Peters
PIIT GmbH

------------------------------------
http://www.valentina-db.de





More information about the Valentina-studio mailing list