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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to display space in FROMUSER

Status
Not open for further replies.

Zahier

MIS
Oct 3, 2002
97
ZA
I know this is probably something for the scripting forum, but I only get this when using FROMUSER.

How do I escape the space in a schema name.

Example

imp username/password file=filename fromuser="John's TABS" touser=MYDATA

In the "John's TABS" portion it will not import because of the space. How do I use an escape sequence to get around this.
 
Zahier,

I don't have a definitive workaround for your specific problem, but the best way to avoid these kinds of problems in the future is never, ever create names for ANYTHING in Oracle that uses characters outside of Oracle's standard naming characters. The rules for standard naming in Oracle are:
Oracle Documentation said:
The first character must be a letter, but the rest can be any combination of letters, numerals, dollar signs ($), pound signs (#), and underscores (_).

Although (via use of enclosure in double-quotes in every reference to the non-standard names...forever) you can create Oracle-object names that use non-standard symbols (e.g. your use of both <space>, <'>, and case-sensitive characters), unless you can justify (from a business perspective) a necessity for using non-standard characters (which I have never seen before), then conventional wisdom is DO NOT use them and if they appear in existing databases, convert the non-standard references as soon as reasonable.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Hello Zahier,

a few thoughts about it:
First of all, needless to say I fully support SantaMufasa's exhortation.
Please don't do it again!

Then I think there is workaround for the blank, and also for the apostrophe.
I am not sure about Windows, but this should work at least on Unix:
imp username/password file=filename fromuser="'John''s TABS'" touser=MYDATA

But, unfortunately a new error will come up, I presume,
something like "JOHN'S TABS" not found in export file
This comes from the mixed cases in the schema name. It would work if the name acctually were in uppercase only.
And I am not aware of a workaround for lowercase letters in schema names.
Maybe someone else is?

But there's another try:
You needn't specify fromuser, if you have got a list of tables instead:
imp username/password file=filename tables=table1,table2,table3 touser=MYDATA
But I don't know what will happen if there are multiple tables with the same name from different schemas.

regards
 
Thanks for the responses guys. Do appreciate them. I have worked around this by doing FULL=y.

I would still like to test your suggestions, and then let you know if it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top