Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> creating a new database

creating a new database

From: Matt Pavey <paveymk_at_hotmail.com>
Date: Mon, 03 Feb 2003 18:39:41 GMT
Message-ID: <NHy%9.308713$Hs2.15409392@kent.svc.tds.net>


Ok, I'm relatively new to Oracle, so I apologize for my ignorance.

Well take that back, I'm not unfamiliar with connecting to Oracle and using it from an application standpoint since I primarily do development; however, I'm new to actually installing, configuring, and creating new databases in Oracle, etc....

However, the situation has arose where I have to do so. So I started out by testing it locally on one of my machines, which runs Windows 2000 Professional. The version of Oracle I am dealing with is 8.1.7.

I installed it and it went perfectly. I had it use a typical configuration for the listener and had it create a default database called MyTestDB during the setup. It ran through everything just fine, and when complete, I was able to get into MyTestDB via DBA Studio and SQL Worksheet just fine. I had some compatibility issues at first; however, I was able to fix that and all was well. And I am able to connect to the database and pull information just fine from my application via ADO and connection string.

So I assumed everything was going to be that simple to install on the actual server; however, that wasn't the case.

The install seemed to go o.k. on the server (Windows 2000 Server), but when it got to the point to configure the listener, I told it to use a typical configuration, but it just seemed to lock up and never finish. So it never got to the point to create the default DB, which I again called MyTestDB.

So I tried creating it manually (MyTestDB) via the Database Config Assistant, but continued to run into the error:

ORA-12560: TNS:protocol adapter error

I researched this error for several hours (days actually) and thought I had got to the point where I understood how it all worked.

Ended up I wasn't able to get anything working still. I tried uninstalling and re-installing Oracle on more than one occassion just to see if that would help, but still had no luck.

So I did some more research to try and fix my problem and am still stuck.

My listner.ora file looks like this:

# LISTENER.ORA Network Configuration File: C:\oracle\ora81\network\admin\listener.ora

# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = Esource-webbox)(PORT = 1521))

)

SID_LIST_LISTENER =
(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = MyTestDB)

(ORACLE_HOME = C:\oracle\ora81)

(SID_NAME = MyTestDB)

)

)

And tnsnames.ora looks like:

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora81\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

INST1_HTTP =
(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = Esource-webbox)(PORT = 1521))

)

(CONNECT_DATA =

(SERVER = SHARED)

(SERVICE_NAME = MyTestDB)

(PRESENTATION = http://admin)

)

)

MYTESTDB =
(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = Esource-webbox)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = MyTestDB)

)

)

I verified that the listener was working correctly by running the following command from DOS:

lsnrctl status

Which gave the results:

LSNRCTL for 32-bit Windows: Version 8.1.7.0.0 - Production on 03-FEB-2003 12:57: 24

(c) Copyright 1998 Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Esource-webbox)(PORT=152 1)))
STATUS of the LISTENER


Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 8.1.7.0.0 - Produc
tion
Start Date                03-FEB-2003 12:17:30
Uptime                    0 days 0 hr. 39 min. 54 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   C:\oracle\ora81\network\admin\listener.ora
Listener Log File         C:\oracle\ora81\network\log\listener.log
Services Summary...
  mytestdb              has 1 service handler(s)

So I "assume" that the listener is in face OK

I also ran the tnsping command to see if I could talk to the mytestdb service. This was the result:

TNS Ping Utility for 32-bit Windows: Version 8.1.7.0.0 - Production on 03-FEB-20 03 13:30:26

(c) Copyright 1997 Oracle Corporation. All rights reserved.

Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=Esource-webbox)(PORT=1521)) OK (90 msec)

So again, I am assuming that the service is ok.

So at this point I have done nothing but verify I had a listener and service right? So now I want to actually create a NEW databse. There is no database yet, that is what I am trying to create.

So I try using the DBCA wizard but when it gets to the point where it tries creating the database I get the TNS:apater error as usual (ORA-12560).

I've even tried creating the scripts from the wizard.

The BAT file that it creates looks like this:

set ORACLE_SID=MyTestDB

C:\oracle\ora81\bin\oradim -new -sid MYTESTDB -intpwd oracle -startmode manual -pfile "C:\oracle\admin\MyTestDB\pfile\init.ora"
C:\oracle\ora81\bin\svrmgrl @C:\oracle\admin\MyTestDBrun.sql
C:\oracle\ora81\bin\svrmgrl @C:\oracle\admin\MyTestDBrun1.sql
C:\oracle\ora81\bin\sqlplus system/manager @C:\oracle\admin\MyTestDBsqlplus.sql
C:\oracle\ora81\bin\svrmgrl @C:\oracle\admin\MyTestDBalterTablespace.sql
C:\oracle\ora81\bin\oradim -edit -sid MyTestDB -startmode auto


I understand that the oradim -new command creates the service for the DB, and I have verified in Control Panel - Services that the MYTESTDB service gets created fine.

But when it gets to the point where it tries running the SQL scripts I get tons of errors...

Here is a small portion of the errors I get from the beginning of the log file:

Echo                            ON

SVRMGR> connect INTERNAL/oracle
ORA-12560: TNS:protocol adapter error
SVRMGR> 
SVRMGR> REM ********** ALTER SYSTEM TABLESPACE *********
SVRMGR> ALTER TABLESPACE SYSTEM
     2> DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 50);
ALTER TABLESPACE SYSTEM
*
ORA-03114: not connected to ORACLE
SVRMGR> ALTER TABLESPACE SYSTEM
     2> MINIMUM EXTENT 64K;
ALTER TABLESPACE SYSTEM
*
ORA-03114: not connected to ORACLE
SVRMGR> And the log file ends up being about 7mb when it is all said and done.

So clearly the problem is seen at the beginning with this line:

SVRMGR> connect INTERNAL/oracle
ORA-12560: TNS:protocol adapter error

So I still run into the same TNS;protocal error as before.

My problem is that I am not familiar enough with Oracle yet to fix my problem.

I had a Oracle DBA take a look at this stuff and he played around with it for about a half hour and wasn't able to get anything working. He thought it might have to do with the fact that I was logged in as a Domain Admin instead of a Local Admin to the server, but that didn't resolve the problem.

I've tried creating the service manuall using oradim, etc... And I've tried tweaking the listener file and tnsnames file but I can't seem to get anywhere with the problem.

I'm hoping someone out there has ran into this problem and has a good explanation on resolving it.

I honestly have tried and researched this for quite awhile, but I'm to the point where I think I'm going to need some expert advice from someone more involved with Oracle.

I'd appreciate your help.

Thanks in advance,
Matt Received on Mon Feb 03 2003 - 12:39:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US