how to create new database to oracle ?

i have rails-2.1.0

my database.yml development:   adapter: oracle   database: pe   username: or   password: or

rake db:create rake db:version --->Current version: 0 rake db:migrate

rake aborted! ORA-12154: TNS:could not resolve the connect identifier specified (See full trace by running task with --trace)

is above idea is possible, then how ?

and i thing i should give service name into some *.ora files.... i don't know how to give and what file it is ..

can any one help me

“database” in database.yml should be set to “hostname/sid”

Jesse Hu wrote:

"database" in database.yml should be set to "hostname/sid"

Cheers, Jesse

i a new to oracle with rails can you tell how to create new SID in oracle-xe.

thankx

In XE your SID will be 'XE'

So your database.yml will look something like:

development:   adapter:oracle   database: 127.0.0.1/XE   username: rails   password: yourpassword

Obviously replace 127.0.0.1 with the IP address / hostname of your oracle server.

Mikel Lindsaar wrote:

In XE your SID will be 'XE'

So your database.yml will look something like:

development:   adapter:oracle   database: 127.0.0.1/XE   username: rails   password: yourpassword

Obviously replace 127.0.0.1 with the IP address / hostname of your oracle server.

-- http://lindsaar.net/ Rails, RSpec and Life blog....

so how to create new database ?

thanks

please visit http://www.oracle.com/technology/index.html or buy an oracle database book :slight_smile:

Sorry I misunderstood you.

" rake db:create" doesn’t work with Oracle. you need to create a database or create an user in an existing database.