Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12154: TNS:could not resolve the connect identifier specified

788693Jul 31 2010 — edited Aug 6 2010
Hi iam a newbie ,Ive installed Oracle database 10g r2 on my windows xp computer but iam having problem with SQL*PLUS
i log in as a SYSTEM user

and run this command "@path\store_schema.sql " to open a sql file i get this type of error
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0640: Not connected

also when i use this command " connect system/password @path\store_schema.sql" i get this other error
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

what is wrong with my installation did i missed anything

-----------------------------------
this is the file that i want to open
-----------------------------------
-- The SQL*Plus script store_schema.sql performs the following:
-- 1. Creates store user
-- 2. Creates the database tables, PL/SQL packages, etc.
-- 3. Populates the database tables with example data

-- This script should be run by the system user (or the DBA)
CONNECT system/manager;

-- drop store user
DROP USER store CASCADE;

-- create store user
CREATE USER store IDENTIFIED BY store_password;

-- allow store user to connect and create database objects
GRANT connect, resource TO store;

-- connect as store user
CONNECT store/store_password;

-- create the tables
CREATE TABLE customers (
customer_id INTEGER
CONSTRAINT customers_pk PRIMARY KEY,
first_name VARCHAR2(10) NOT NULL,
last_name VARCHAR2(10) NOT NULL,
dob DATE,
phone VARCHAR2(12)
);

CREATE TABLE product_types (
product_type_id INTEGER
CONSTRAINT product_types_pk PRIMARY KEY,
name VARCHAR2(10) NOT NULL
);

CREATE TABLE products (
product_id INTEGER
CONSTRAINT products_pk PRIMARY KEY,
product_type_id INTEGER
CONSTRAINT products_fk_product_types
REFERENCES product_types(product_type_id),
name VARCHAR2(30) NOT NULL,
description VARCHAR2(50),
price NUMBER(5, 2)
);
-----------------------------------------------------
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2010
Added on Jul 31 2010
17 comments
4,405 views