PL/SQL :: Connect To Pdb To Unlock Old Schemas Like Scott And Hr In 12c

Sep 22, 2013

After successfully installing the 12c, how can I connect to pdb to use the scott or hr schemas?By default when I connect as sys or system from sqlplus it is connecting to orcl not to pdborcl.also how can we make scott connection in sql developer.

View 11 Replies


ADVERTISEMENT

MML For BlackBerry Unlock Client

Mar 11, 2011

i update MFI Loader from 1.8 to 2.0.1 When i open this what i get System.Data.OracleClient requires Oracle client software version 8.1.7 or greater [color ="# FF0000"][/color]

View 3 Replies View Related

PL/SQL :: Unlock Oracle Database User?

Jun 14, 2013

Could the Oracle database user be configured so that it will not get locked with infinite wrong tries.

View 3 Replies View Related

SQL & PL/SQL :: Select First Unlock Record In Table For Update

Jun 6, 2012

I'm looking for a solution to select the first row that is not currently locked in a table and insert a record to another table that reference that first row. this is my scenario:

create table ticket
(
id number(10) not null,,
ticket_type number(1) not null,,
is_sold number(1) not null,
CONSTRAINT ticket_pk PRIMARY KEY (id)
);

[Code]...

id ticket_type is_sold
------------ -------------------- -----
10000004 1 1
10000005 2 1
10000006 1 0
10000007 1 0
10000008 2 0
10000009 2 0

SQL> select * from customer_ticket;

cust_id cust_name ticket_id
------------ -------------------- ----------
1 John 10000004
2 Sara 10000005

my goal is finding the first free ticket ( not sold ) in the ticket table and insert buyer information of that ticket in customer_ticket table. at last I will mark that ticket as a sold one in ticket table with update.

Problem is that the first transaction locks the the first row in ticket table and the second transaction running the same query goes to wait untill the first transaction commit or rollback. However when first transaction finish successfully, second transaction select duplicate id from ticket table that was selected by the first transaction!

I tried to solve problem with "skip locked" and "nowait" options with select for update, but they didn't work.

View 13 Replies View Related

Find Schema Stats Lock Or Unlock

Apr 20, 2013

How to find schema stats locked or unlocked?

View 3 Replies View Related

SQL & PL/SQL :: User Scott Having DBA Privilege

Oct 14, 2011

User Scott having DBA privilege

create or replace procedure pt is
l_count integer:=0;
v_sid varchar2(1000);
begin
SELECT name
INTO v_sid
FROM v$database;
dbms_output.put_line('SID='||v_sid);
end pt;

Warning: Procedure created with compilation errors.

SQL> sho err
Errors for PROCEDURE PT:

LINE/COL ERROR
-------- -----------------------------------------------------------
5/1 PL/SQL: SQL Statement ignored
7/9 PL/SQL: ORA-00942: table or view does not exist
SQL>

SQL> select name from v$database;
NAME
---------
ORCL

I can't access v$parameter,or v$database from a procedure?

View 1 Replies View Related

PL/SQL :: Use Loops To Retrieve Name Of Emp Table Of Scott Schema

Jan 12, 2013

i am trying to use loops to retrieve the ename of emp table of scott schema , then under they are retrieved , all "sal" values appear under them , i do not want employee's salary under each employee , i need retrieve the 14 record of enames , then under them the 14 record of sal column appears , so i used this code :

declare
cursor emp_cur is
select ename from emp;
emp_rec emp_cur%rowtype ;
[code]....

View 16 Replies View Related

SQL & PL/SQL :: Employee Table In Scott Schema Created By Default

Oct 3, 2011

I am using Oracle 11g Release 11.2.0.1.0

OS: Windows

I am using the Employee table in Scott schema which created by default.

10,20,30,40,50 are the department ids.

I would like to have the output like below. I am having lots of values in dep id and lots of employees in each dept ids

Emp name Dep ID
John 20
Mike 40
Ram 10
Guru 50
Kumar 30

View 7 Replies View Related

PL/SQL :: Delete Scott And Storage Information Same Time Using REGEXP_REPLACE?

Jul 11, 2013

I used REGEXP_REPLACE to delete Scott. is there any way to delete Scott and Storage information same time using REGEXP_REPLACE...? 

select REGEXP_REPLACE(dbms_metadata.get_ddl('TABLE','EMP'),'("Scott".)','', 1, 0, 'i') from dual; result: CREATE TABLE "EMP" ( "EMPNO" NUMBER(4,0) NOT NULL ENABLE, "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4,0), "SAL" NUMBER(7,2), "DEPTNO" NUMBER(2,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGINGTABLESPACE "USERS"I want:CREATE TABLE "EMP" ( "EMPNO" NUMBER(4,0) NOT NULL ENABLE, "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4,0), "SAL" NUMBER(7,2), "DEPTNO" NUMBER(2,0))

View 18 Replies View Related

Corrupt Some Block Of Oracle Seeded Table Within Scott Schema

Mar 27, 2013

how can i corrupt a block to mock up BMR (block media recovery) workaround , I want to corrupt some block of Oracle seeded table "emp" within scott schema.

View 1 Replies View Related

Export/Import/SQL Loader :: Import Scott To Scott1 Without Affecting Existing Records

Sep 29, 2012

My database version
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionOS version:

Windows 7 64bit I have schema(scott) export with schema level option and imported with different name as (scott1).At regular period of time i need to import the scott to scott1 without affecting existing records.such as
*1. Need to append new created records.*
*2. Need to append updated records.*

for the above requirement I did in the following way
expdp xxxx/******** schemas=SCOTT directory=dumpdir dumpfile=SCOTT_28-SEP-2012.dmp logfile=exp_SCOTT_28-SEP-2012.log imported in the following way impdp xxxx/******** AS SYSDBA REMAP_SCHEMA=SCOTT:SCOTT1 directory=DUMPDIR dumpfile=SCOTT_28-SEP-2012.dmp logfile=imp_SCOTT2_28-09-2012.log TRANSFORM=SEGMENT_ATTRIBUTES:n TABLE_EXISTS_ACTION=APPEND.

The problem is i couldn'table to append the records to existing tables the log error show such ways.

ORA-31684: Object type USER:"SCOTT1" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
[code].....

View 5 Replies View Related

Server Utilities :: How To Take All Schema Metadata Export Except One Schema (scott)

Jul 5, 2012

how to take all schema metadata export except one schema (scott)

can i use like EXCLUDE=schema:"IN('SCOTT')

View 4 Replies View Related

SQL & PL/SQL :: How To Run Query Between 2 Schemas

Jan 8, 2013

Is there any way to run a select command between 2 different schemas without using DB links ?

View 1 Replies View Related

SQL & PL/SQL :: Not Getting Output For Other Schemas?

Feb 2, 2010

One function returns table metadata in xml form. This works for current schema but not for other schemas. Is it a privilege problem?

my code is..

CREATE OR REPLACE FUNCTION TEST.F_DBEG2
RETURN XMLTYPE
AS
Handle NUMBER;
V_OUTPUT_TOTAL XMLTYPE;
V_CNT NUMBER := 0;
BEGIN

[code]....

but when i select the object of another schema, got output.

SELECT * FROM TEST_NEW.DEPT;

Which privilege i need?

View 9 Replies View Related

SQL & PL/SQL :: Get Metadata Of Different Schemas

Jun 6, 2012

I'm trying to get the Create-Statements of all tables of several schemas:

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name,'<schmema>')
FROM (SELECT TABLE_NAME, OWNER FROM SYS.ALL_TABLES WHERE owner='<schema>') u

Is there a way to create a loop to handle several schemas listed in a array, for example?

View 10 Replies View Related

SQL & PL/SQL :: Find Difference In Two Schemas?

Feb 25, 2013

I want to find difference between the objects(tables(columns,constraints), views, sequences) in two schemas. One schema is staging and one is development . In development lot of changes are made , Is there a script or a opensource tool which will bring out the difference in columns, constraints in each table and sequences , views etc.

View 2 Replies View Related

Client Tools :: Able To Connect From SQL-Assistant BUT Unable To Connect From SQL Developer

Jul 7, 2012

I have been troubling with this issue for the last two weeks...tried so much, but could not able to resolve....

sqlplus username/password@IPAddress:port/ServiceName

I am able to connect to DATABASE from SQLAssistant only when I provide string like ABOVE........If I dont mention the SERVICE, m unable to connect to DB.Now the biggest issue is with SQL Developer.....m not at all able to connect to DB using SQL Developer.

View 3 Replies View Related

Client Tools :: Connect Oracle Developer 6i Without Connect String

Aug 17, 2010

I have installed oracle developer 6i. in sqlplus i want to put my username and password but nothing in the connect string field.

View 1 Replies View Related

Connect Oracle Database From Delphi - Could Not Resolve Connect Identifier Specified

Oct 6, 2010

I have the following computer/setup:

Acer laptop, Intel Processor w/ Windows 7 Professional (64-bit)
Delphi 2010 Professional
Oracle XE (+ the Oracle XE client that comes with it)

I cannot can't to the Oracle database from Delphi. The error I keep getting is:

Alias is not currently opened. [Oracle][ODBC][Ora]ORA-12154:TNS: could not resolve the connet identifier specified.

Here's what I've done:

1. Create an ODBC connection to my Oracle database

- run C:WindowsSysWOW64odbcad32.exe to open the ODBC administrator.
- Data source name: bt_user
- TNS Server Name: localhost/xe
- user bt_user
- Clicked "test connection" -- Success.

2. Open Delphi and drop a TDatabase component on my main form.

- Set the Alias Name property to "bt_user" (the alias I set up in ODBC)
- Set database name to "bt_user".
- Checked "connected".

Alternatively, I tried using the Delphi ADO components (the dbGo components).

- Drop TADOConnection component on my form.
- Select "connection string" and open the dialog.
- Click "build string".
- Select "Microsoft OLE DB Provider for ODBC Drivers" from the selection.
- In "use data source", select "bt_user" from the drop-down list (my ODBC connection from #1)
- Click "test connection".

Again the same error.

My questions are:

1. Can Delphi work with Oracle XE (Express Edition)?

2. If so, then do I need to install the "Instant Client"?

3. Will the instant client for Oracle 10g work with Oracle 10g XE?

4. Do I need to install any additional ODBC driver(s)?

5. Why was I successful in creating the ODBC connection in Windows, but it failed in Delphi?

6. Will Visual Studio.NET (C#) work with Oracle XE, and what are the steps for setting that up?

View 2 Replies View Related

Server Utilities :: Export Schemas From 10g To 11g?

Apr 27, 2011

I am trying to export schemas from 10g to 11g. The NLS_CHARACTERSET for 10g is WE8ISO8859P1 and the NLS_CHARACTERSET for 11g is WE8MSWIN1252. Is it fine or do I need to change the character set, so that I will be able to successfully do the export/import?

View -1 Replies View Related

SQL & PL/SQL :: How To Know Schemas In A Role And Privileges On Objects

Jul 14, 2011

I have a role mfg_grp .I want to know, to whom the role is granted and which objects and which privileges on those objects are assigned to this role.

View 4 Replies View Related

SQL & PL/SQL :: Retrieve List Of Tables With Same Name From Two Schemas

Sep 16, 2013

I need to retrieve the list of tables with same name from 2 different schemas.

View 10 Replies View Related

SQL & PL/SQL :: Create A Trigger On Multiple Schemas

May 25, 2011

I have following schemas in my database scott,sh,hr...I created a triger on a schema scott with the following method

1. sqlplus / as sysdba

2. CREATE TABLE LOGIN_AUDIT_INFO_ALL (
operation VARCHAR2(30),
obj_owner VARCHAR2(30),
object_name VARCHAR2(30),
sql_text VARCHAR2(64),
attempt_by VARCHAR2(30),
attempt_dt DATE);

3.CREATE OR REPLACE TRIGGER login_audit_prod_schemas
AFTER CREATE OR ALTER OR DROP
ON SCOTT.SCHEMA
[code]....

But it don't fulfill my requirement. trigger is fired when scott perform any action. but my requirment is that trigger should be fired when create action is performed on scott by hr,sh or scott. i also want a single trigger which fulfill the requirement.

View 8 Replies View Related

What Privileges Other Schemas Have On Objects Of Schema A

May 19, 2013

i have schema A and i want to check who(which schemas) can access schema A's objects and what privileges other schemas have on objects of schema A.

View 7 Replies View Related

Query Multiple Schemas Against Default_tablespace?

Feb 6, 2013

i am trying to generate a SUM from the individual schemas to put on this report but i can't seem to get it right...

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<meta name="generator" content="SQL*Plus 11.2.0">
<TITLE>Launch page </TITLE></head>
<body>
<table border='1' width='90%' align='center' summary='Script output'>

[code].....

View 1 Replies View Related

PL/SQL :: Unique Schemas - Users List

Aug 5, 2013

find the below task. I have unique schemas. and every schema we have many tables.I would like to know

1. I have Scott schema and here I have 10 tables. EMP,DEPT,SALGARDE ( and these tables having different priviliges).

2. another schema MACIN having table DEPT, SALS, GRADE ( having different priviliges) Now I would like to know Schema 1 having permissions to see the tables and he is doing some modifications,inserting,deleting .... on tables containing in MACIN schema.like this it is happening in vice verse in max schemas. now I would like to know who all are having access to login to another schema and what are the priviliges they have till now on what  tables they applied changes...is it possible to figure out? if yes how can we?

View 6 Replies View Related

Comparison Between Toad And SQL Developer To Compare Schemas

Apr 17, 2013

My primary objective was to compare objects in schemas in two different databases and find out the differences, Execute DDL's in the database where objects are missing and syn schemas in two different databases.

So I need to compare schemas in databases. Which tool will be user friendly to make a comparison of database objects existing in schemas in two different databases.

I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons. How to make a comparison. I have some idea on using TOAD but was not familiar with SQL Developer.

Below is my requirement:-

Connect to Source
Connect to Target
Compare schemas with different object types
Find out differences
Generate DDL's for the missing objects or for the objects in difference report
Run them in missing instace(Source/Target)
Make sure both are in sync.

View 2 Replies View Related

Enterprise Manager :: OEM And Privilege To See Users Schemas

Apr 19, 2010

I connect to an Oracle-10g database using OEM, and if I click to see the list of users, roles, storage options, ... everything is ok, but if I click to see the list of schemas, I get "1031: insufficient privileges" error.

The user account I use has the SELECT_ANY_DICTIONARY privilege and SELECT_CATALOG_ROLE role granted, and if I try to do "select * from dba_tables" in the SQL*Plus, I get a result.

The matter is even more strange because, if I use the SYSTEM account, I get the same error (!!!).

Do I need any other privilege/role to see the user's schemas with OEM?

View 2 Replies View Related

SQL & PL/SQL :: Create Two Objects In Different Schemas In A Single Database?

Jul 25, 2010

Is it possible to create two objects in different schemas in a single database.

For example in Schema A, table "T1" is there, is to possible to create a table with the same name "T1" in Schema B.

View 4 Replies View Related

SQL & PL/SQL :: Comparing Schemas - Content (data) Identical

Jan 20, 2011

I have two schemas with 149 tables in each schema, what I need to do is to prove that the content(data) between the two schemas is identical. I know that all the table names between the two schemas are the same, just need to prove that there is no difference in data.

So the query needs to prove that Schema A content = Schema B content

I know I cant do a simple select from Schema A.tab1 minus select Schema B.tab1 but since there are 159 tables, I am not sure if this is an efficient way of doing it.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved