Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import/Export to Oracle

Status
Not open for further replies.

rpk2006

Technical User
Apr 24, 2002
225
0
0
IN
When I use Import/Export feature of SQL Server 2000 to migrate SQL Server 2000 database to Oracle, SQL Server converts all table names to something like this:
"table name", instead of just table names without any quotes.

Because of this when the tables are successfully migrated to Oracle and when I run SQL Query, I have to use like this:

Select * from "table name"

instead of simply,

Select * from table name.

What's the problem? Why SQL Server includes double quotes with the table names and how to get rid of this?


 
Select * from table name will bring nowt back - you cant have spaces in table names unless you put them in []

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
After you select the tables to copy, check in the transformations buttons. The script to create the table should be there. Make sure it has no " in it. Do your table names have spaces in them?

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Just to clarify, in Oracle, so long as you name an object within double quotes (which I do not recommend), you can use any character(s) you wish:
Code:
SQL> create table " " (" " varchar2(20));

Table created.

SQL> insert into " " values ('This is a test.');

1 row created.

SQL> select * from " ";


--------------------
This is a test.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 20:01 (23Feb05) UTC (aka "GMT" and "Zulu"),
@ 13:01 (23Feb05) Mountain Time

Do you use Oracle and live or work in Utah, USA? Then click here to join Utah Oracle Users Group on Tek-Tips.
 
My Table Names are of single words and there is no question of giving spaces between words.

In the Transformation Button in 'Import/Export' wizard of SQL Server 2000, I tried removing "", but it displayed error and insisted of using "".

If you Import Oracle database to SQL Server, then the 'Import/Export' Wizard changes the SQL Server names to something like this:

[TableName]

 
in the DTS wizard the table name is surrounded by [] but when you look at the table following the import - as long as there are no spaces in the table name the [] will not be present in the name.

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Is this a one-time export, or a regular process?

If it is just a one-time conversion and there are not many tables, you can create the tables in Oracle, then load the tables with the import/export wizard.



SQL/SAP DBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top