Home
Search results “Oracle select dbid”
Simulación recuperación ante desastre con RMAN
 
37:59
Administración de Bases de Datos - Unipanamericana - 2017 1. Ver la configuración actual de RMAN Ejecutamos: rman target / Para ver la configuración actual del RMAN Ejecutamos: SHOW ALL; 2. Cambiar algunos parámetros de configuración del RMAN - Para configurar la ubicación de los archivos de backup... Ejecutamos: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\backup\full_%u'; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\backup\full_%f'; - Para configurar el período de retención... Ejecutamos: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; Ahora verificamos que los dos cambios están hechos... Ejecutamos: SHOW ALL; En caso que se quiera limpiar un parámetro, por ejemplo, la política de retención... Ejecutamos: CONFIGURE RETENTION POLICY CLEAR; 3. Respaldar la Base de Datos Oracle - Respaldo completo de la base de datos sin el archivo de registro... Ejecutamos: BACKUP DATABASE; - Respaldo completo de la base de datos con el archivo de registro... Ejecutamos: BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT; Si fall el commando anterior… run { shutdown immediate startup mount backup database plus archivelog delete input; SQL 'ALTER DATABASE OPEN'; } -- Respaldo de un tablespace... BACKUP AS BACKUPSET TABLESPACE USERS; 4. Comprimir un respaldo Ejecutamos: BACKUP AS COMPRESSED BACKUPSET TAG 'DAILY_ORCL_BK_ONLY' TABLESPACE USERS; 5. Ver todos los respaldos de RMAN Ejecutamos: LIST BACKUP SUMMARY; - Para ver el estado de los respaldos cuando RMAN está en ejecución... Ejecutamos SELECT OPERATION, STATUS, MBYTES_PROCESSED, START_TIME, END_TIME from V$RMAN_STATUS; 6. Simular el desastre Estando en la consola de RMAN, ejecutamos: SHUTDOWN ABORT; - Abrimos una consola de texto de Windows... Nos pasamos a D:\app\oracle\product\11.2.0\dbhome_1\dbs Ejecutamos: del perf11.ora del init.ora - En SQLPlus, vamos a averiguar la ubicación de los archivos de datos, de control y logs... Ejecutamos: select name from v$datafile; select member from v$logfile; select name from v$controlfile; show parameter dump_dest Es importante averiguar el Oracle DBID, si no lo tenemos, se presentará un error al recuperar los archivos spfile y controlfile... Ejecutamos: select DBID from v$database; DBID ---------- 1470628578 Tomamos nota de las rutas... - De nuevo, en la consola de texto de Windows, nos pasamos a la carpeta donde se encuentran los archivos de datos de oracle... Ejecutamos del *.* /f 7. Restaurar la base de datos Accedemos de nuevo a la consola de RMAN Ejecutamos: rman target / set dbid=1470628578; startup force nomount; restore spfile to 'D:\app\oracle\product\11.2.0\dbhome_1\dbs\perf11.ora' from 'D:\backup\FULL_0KS4QNS7'; shutdown immediate; quit -- Verificamos que el archivo restaurado, y vovemos a la consola de RMAN rman target / startup nomount; set dbid=1470628578; restore controlfile from 'D:\backup\FULL_0KS4QNS7'; alter database mount; Ahora vamos a restaurar y recuperar la base de datos... Accedemos de nuevo a la consola de RMAN Ejecutamos: rman target / restore database; recover database; alter database open resetlogs;
How to Rename datafile in Oracle
 
08:05
How to Rename datafile in Oracle ====================================== How to Rename datafile ====================================== select FILE_NAME,TABLESPACE_NAME,ONLINE_STATUS from dba_data_files; select status,instance_name,database_role,protection_mode from v$database,v$instance; alter database datafile '/opt/oracle/oradata/prim/users_test_after_rename.dbf' offline; server: mv old_data_file new_data_files alter tablespace USERS rename datafile '/opt/oracle/oradata/prim/users_test' to '/opt/oracle/oradata/prim/users_test_after_rename.dbf'; alter database datafile '/opt/oracle/oradata/prim/users_test_after_rename.dbf' online;
Views: 169 ANKUSH THAVALI
Oracle DBA Justin - How to setup multiple archived log locations for an Oracle database
 
10:30
How to setup multiple archived log locations for an Oracle database
Views: 4791 jbleistein11
Catalog rman Parte 1
 
13:33
--Criando a tablespace: CREATE TABLESPACE rcat_ts DATAFILE '+DATA' SIZE 15M; --Criando o usuário do Catálogo CREATE USER rcat IDENTIFIED BY cat123 DEFAULT TABLESPACE rcat_ts; GRANT connect,resource,recovery_catalog_owner TO rcat; Conectando no Catálogo rman target /catalog rcat/cat123 create catalog; String de Conexao: CATALOGO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = srv.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = catalogo) ) ) Registrar banco no Catálogo rman target / catalog rcat/[email protected] register database; sqlplus rcat/[email protected] select NAME,DBID from rc_database;
Views: 300 Target Database
How To Kill All Database Processes On SQL Server
 
06:42
SQl management studio provides lot of facilities to manage SQL processes. The “Activity monitor screen” which will show you some very useful and important information about SQL processes. It will show you all active processes, there status, number of open transactions for each process, the application by which the process is generated, Wait time CPU and memory utilisation, and the host name, means the host or the machine by which the process is initiated etc. If a process is hanging, it will show the process icon with an hour glass. Refresh it several times, sometimes the icon will turn to sleep mode if the process completes its execution. If the icon remains an hour glass, the process may be hanging. Use other info as well to decide if the process is really hanging. If you double click on the process ID it will show the SQL stamen subjected to the execution of the process. If a process is hanging you can identify which application has originated the process, which SQL stamen is hanging and even more from which machine or the host the process is initiated If some application users are complaining about uneven slowness, uneven timeouts etcetera, the reason behind may be one or more processors are hanging. What can you do now? You can restart the SQL server or the service which will disconnect all databases and all applications disturbing all the users. Or otherwise you can take the database to off line and bring it back to online. Or you can disconnect all connections to the database. The disturbance may be lesser than the previous case but still lot of applications and users can be disturbed, especially in an industrial setup. And still you do not know the real reason for the slowness or the malfunctioning as well. So what can you do? Go and examine the processors. Identify exactly which process is hanging. And most probably you will be identifying how and why. So you can find permanent solution. But the immediate solution is you can kill the troubling process or the few. It will solve the issue with minimum disturbance immediately. After identifying the correct process, you can right click on the process ID and click on ‘Kill process’ button. It will kill the selected process. You can kill processors using SQL statements and, using SQL commands you can kill all processors at once as well. Code for Killing Processes Individually USE master go DECLARE @dbname sysname SET @dbname = 'YourDB' EXECUTE ('KILL 53') Code for killing all Processes USE master go DECLARE @dbname sysname SET @dbname = 'YourDB' DECLARE @spid int SELECT @spid = min(spid) from master.dbo.sysprocesses where dbid = db_id(@dbname) WHILE @spid IS NOT NULL BEGIN EXECUTE ('KILL ' + @spid) SELECT @spid = min(spid) from master.dbo.sysprocesses where dbid = db_id(@dbname) AND spid @spid END
Views: 5853 Rohan Mehtha
SQL Tutorial - Constraints Part-1st
 
17:58
Constraints prevent from the deletion of the data from the table if there are dependency exits... and constraints are very help full to apply restriction...
Views: 676 Oracle World
How to Get locked Objects in SQL Server
 
08:38
Click here to Subscribe to IT PORT Channel : https://www.youtube.com/channel/UCMjmoppveJ3mwspLKXYbVlg Generally, There are two ways to get what are the objects are Locked. First way with SP_LOCK, We can get the Locked Object details in a Particular Session Or SQL Server Engine. Second way is Used with DMV, Sys.dm_trans_lock it returns the Locked Objects with Some more data's when compared to SP_LOCK. Both are explained with Simplest Example in this Video. To Get Locked Objects ----------------------------------- Select S2.host_name, S1.Resource_type, (Case when S1.resource_type IN ('RID', 'PAGE') then s5.name when S1.resource_type IN ('DATABASE') then s6.name else S4.Name end) Name, S1.resource_associated_entity_id, S1.request_mode, S1.request_type, S1.request_status, S1.request_session_id, ISNULL(S3.rows , 0) Rows From Sys.dm_tran_locks S1 Inner join Sys.dm_exec_sessions S2 on S1.request_session_id = S2.session_id left join sys.partitions S3 on S1.resource_associated_entity_id = S3.partition_id left join sys.objects s5 on s3.object_id = S5.object_id left join sys.objects S4 on (case when S1.resource_type = 'OBJECT' THEN S1.resource_associated_entity_id else null End) = S4.object_id left join sys.sysdatabases s6 on S1.resource_database_id = s6.dbid Where S1.resource_database_id = DB_ID() With Requested SQL Server Statement ------------------------------------------------------------- Select S1.*, S2.text From sys.sysprocesses S1 cross apply sys.dm_exec_sql_text (Sql_handle) S2 Where spID = SessionID
Views: 233 IT Port
Oracle Data Guard
 
05:27
The software which Oracle Corporation markets as Oracle Data Guard forms an extension to the Oracle RDBMS. It aids in establishing and maintaining secondary "standby databases" as alternative/supplementary repositories to production "primary databases". Oracle provides both GUI and command-line tools for managing Data Guard configurations. This video is targeted to blind users. Attribution: Article text available under CC-BY-SA Creative Commons image source in video
Views: 53 Audiopedia
How to Get locked Objects in SQL Server Tamil
 
07:43
Click here to Subscribe to IT PORT Channel : https://www.youtube.com/channel/UCMjmoppveJ3mwspLKXYbVlg Generally, There are two ways to get what are the objects are Locked. First way with SP_LOCK, We can get the Locked Object details in a Particular Session Or SQL Server Engine. Second way is Used with DMV, Sys.dm_trans_lock it returns the Locked Objects with Some more data's when compared to SP_LOCK. Both are explained with Simplest Example in this Video. To Get Locked Objects ----------------------------------- Select S2.host_name, S1.Resource_type, (Case when S1.resource_type IN ('RID', 'PAGE') then s5.name when S1.resource_type IN ('DATABASE') then s6.name else S4.Name end) Name, S1.resource_associated_entity_id, S1.request_mode, S1.request_type, S1.request_status, S1.request_session_id, ISNULL(S3.rows , 0) Rows From Sys.dm_tran_locks S1 Inner join Sys.dm_exec_sessions S2 on S1.request_session_id = S2.session_id left join sys.partitions S3 on S1.resource_associated_entity_id = S3.partition_id left join sys.objects s5 on s3.object_id = S5.object_id left join sys.objects S4 on (case when S1.resource_type = 'OBJECT' THEN S1.resource_associated_entity_id else null End) = S4.object_id left join sys.sysdatabases s6 on S1.resource_database_id = s6.dbid Where S1.resource_database_id = DB_ID() With Requested SQL Server Statement ------------------------------------------------------------- Select S1.*, S2.text From sys.sysprocesses S1 cross apply sys.dm_exec_sql_text (Sql_handle) S2 Where spID = SessionID
Views: 67 IT Port

Annotated bibliography thesis example sentence
A sample annotated bibliography in mla format
Resume cover letter example australian
Custom paper service term writing
The cube 2012 application letters