ORA-12154: TNS:could not resolve the connect identifier specified
788693Jul 31 2010 — edited Aug 6 2010Hi 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)
);
-----------------------------------------------------