Tag Info

Hot answers tagged

4

I think as a DBA you will inevitably lose the fight to keep hands out of your database. Having said that I think we owe it to our customers to try and provide a product that they can use. There are dangers and pitfalls of even read-only access that any DBA should be aware of: You admitted that you are working with large record counts in your tables. What ...


3

Whether the data can be manipulated by a user depends on the rights he has. Rights to database objects like tables and views are given either directly to a user or via a role. Roles have the advantage that you can assign them to new users easily without having to deal with the details. I would suggest at least two roles: An admin role and a user role. ...


2

Query V$SESSION and include the column SESSION_EDITION_ID which contains the value you are looking for. The link http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_3016.htm#REFRN30223 defines all the column meanings for that dynamic view; I would probably do a query like SELECT SID, USERNAME, SCHEMANAME, OSUSER, PROCESS, MACHINE, ...


2

Partitioning should work better than index if the number of rows is large. If the query needs to scan only one partition, it is more efficient than finding current rows through index. If SRC_CURRENT is updated to 0 when newer rows are loaded, you need to enable row movement for the table. This will allow rows to move from current partition to historical ...


2

The public link below gives an overview of the four installation type options for the 11gR2 client: http://docs.oracle.com/cd/E11882_01/install.112/e24322/install_overview.htm#LACLI1245 Instant Client: Enables you to install only the shared libraries required by Oracle Call Interface (OCI), Oracle C++ Call Interface (OCCI), Pro*C, or Java database ...


2

There are no architecture differences in RMAN itself. The difference is in the speed of the backups if written to the Exadata on-board storage. So the advantages that Exadata brings in terms of hardware would also translate to advantages in backup speed and MTR (mean time to recovery). But none of those advantages are the result of changes to RMAN.


2

This is what I use in my login.sql. Tom Kytes book Expert One on One has this script. No sign of ORA-01034 when instance is down. My prompt only shows idle> set term off -- a lot of stuff REM here is how I set my signature prompt in sqlplus to REM username@database> I use the NEW_VALUE concept to format REM a nice prompt string that defaults ...


1

There are a variety of approaches you could take. You should pick the one you feel is most suitable for your application. Include no WHEN OTHERS exception handlers and let the raw Oracle errors propagate to your users. Include WHEN OTHERS exception handlers in the top-level blocks. Include WHEN OTHERS exception handlers in all/most blocks The first ...


1

select sum(case when issue_date = return_date then 1 else 0 end) SAME_DAY, sum(case when return_date is null then 1 else 0 end) NOT_RET, sum(case when issue_date <> return_date then 1 else 0 end) SEP_DAY from books;


1

It's your regexp_like expression that is invalid. You're using your column as if it was a function name. The syntax is: regexp_like(thing_to_check, pattern [, options]) You should write: regexp_like(species_imagefile, '[A-Z0-9._%-]+.JPG', 'i') 'i' is for case-insensitive matching.


1

It is quite simple: select AIN, max(ACCEPT_TYPE) keep (dense_rank first order by date1) ACCEPT_TYPE_1, max(ACCEPT_TYPE) keep (dense_rank first order by date1 desc) ACCEPT_TYPE_2, min(DATE1) date_1, max(DATE1) date_2 from my_table group by AIN


1

In your example, you have Autoextend on with 4M as the next extension, but you also have MAXSIZE set to 8G, which means that Oracle is being told that once a tablespace reaches 8G, it will no longer automatically add space. This is for safety purposes, as sometimes administrators want to know when a datafile is growing very large very quickly. In your ...


1

The statement terminator in SQL Server is a semi-colon ;. http://msdn.microsoft.com/en-us/library/ms177563.aspx As queries cannot contain a semi-colon, except as the last character to identify the end of the query, this should be enough for you to separate out each statement.


1

Datapump is much more efficient than exp: Datapump runs within the Oracle server processes, and can read directly from the database files and write directly to a file on the server. As I understand it, data access is direct, not via SQL. exp uses the ordinary Oracle Call Interface (OCI) -- the library that Oracle provides to connect to the database. It can ...


1

Here's how searching for any object works (this example assumes the user has appropriate permissions, and that you didn't make the call as "schema.table") Search the current schema for that object Search private synonyms for references to that object Search public synonyms for references to that object So if you create a public synonym, any user that has ...


1

Do both servers have similar hardware and OS? Is there enough storage space for the 11g database? Have you thought about using data pump instead? With data pump and enterprise edition you can export and import in parallel as well as compress. With 10g you can compress the meta data but not the data. With 11g you can compress the data and meta data. How does ...


1

It could be that one of the imp default parameters for Oracle 10G is different in Oracle 11G. I would try adding the buffer=4096000 parameter to the imp command to see if that helps. That parameter is available on both exp and imp commands.


1

Your database isn't open. Open it using the below command. alter database open;


1

I know you already accepted the answer, but it seems to me, since you're constantly aging out the active rows, you could simply create a function based index on the SRC_CURRENT column. It'd be something like this: create index src_current_active_fbidx on <table>(decode(src_current, 1, 1, null)); This will create a compacted index of only the rows ...


1

I think you want this: ALTER TABLE TRUCK ADD (ttype VARCHAR2(6) CONSTRAINT con_type CHECK (ttype in('SMALL','MEDIUM','LARGE')) );


1

The graph is showing the number of sessions in wait. The colors represent a broad category of wait class, which assists in quickly identifying the primary type of wait faced by sessions in the database. The maximum CPU line simply gives you a marker to determine if the amount of CPU wait is reaching extremely critical levels.


1

It would be difficult to say whether this solution would be preferred without knowing more about the nature of the data you are storing and how it will be accessed, but here is another idea you may not have considered. Since your data is fairly static and will be accessed from PL/SQL and the application, you could simply embed the data in a PL/SQL package. ...


1

You should create a table and grant the appropriate permissions so that only the intended users have update capabilities. I strongly discourage using views in the manner you suggested. Since you are creating a table of states you don't need an ID value since each state is unique. The state or abbreviation could be the primary key. If you must use an ID ...


1

Start here: 11G 2 Day DBA Best of luck!


1

Given your error ("OFUSER_PK"), this is an indication that the primary key on the OFUSER table is the problem. Check your insert statements for OFUSER - something seems wonky there.


1

In OEM 12c Enterprise Manager, you can change both the body and the subject of email alerts through the web-based EM console. Once logged in, you should see menu options in the top right corner like "Setup" and "Help" with down arrows indicating a drop-down menu. Click "Setup" -> "Notifications" -> "Customize Email Formats..." From here, you can select ...


1

ALTER SESSION SET CURRENT_SCHEMA will work, but you still need to do all of the grants. – Phil Oct 29 at 23:33


1

The "a" is a table alias and on a simple query is not much use, but in a query with two or more tables they come in quite handy, especially if the tables have common column names: Select a.Order_id, b.Cust_name From Orders a, customers b Where a.Order_id = b.Order_id; Without the alias the SQL would be: Select orders.Order_id, ...


1

There are several ways to do this. One would be to use a pipelined function to return the additional row when the day spanning condition is detected. Another way is to duplicate the rows and then eliminate the ones that don't need to be duplicated and adjust the times for those that do. Here is an example: SELECT Case When TwoRowsNeeded = 1 And ...


1

@mbonaci sqlplus / as sysdba then issue command startup; to start the database Also on Linux with this error, you can check first if Oracle background processes are up with ps aux | grep pmon. Pmon is process monitor, or check some other background process. If they are not running then the database is not running.



Only top voted, non community-wiki answers of a minimum length are eligible