Oracle Users Management

Oracle Users Management

-- USERS -- Note, generally users are not created under CDB databases, -- If you wish to create a user under a CDB use the following syntax create user C##scott identified by scott; -- USERS -- View all users / schemas SELECT username FROM dba_users; -- Create a new...
Oracle Networking

Oracle Networking

Lesson 3 - Networking ---------------------- 1. Connect-Identifier 2. Connect Decriptor (Machine, Port, Protocol, Actual instance/service name) 3. Naming method - Local Naming (Uses a local configuration file - TNSNAMES.ORA) - EZCONNECT (Uses a TCP/IP connect string )...
MSSQL Server – Advanced DatabaseMail Implementations

MSSQL Server – Advanced DatabaseMail Implementations

select * from msdb.dbo.sysmail_sentitems select sent_date, send_request_user, subject, body from msdb.dbo.sysmail_sentitems order by sent_date desc -- This contains one row for each message that has an unsent or retrying status. select * from...
דוגמאות קוד – SQL Server Merge

דוגמאות קוד – SQL Server Merge

USE HR GO DROP TABLE emp_source ; GO DROP TABLE emp_destination ; GO DROP TABLE merge_log GO SELECT TOP 20 employee_id , last_name , salary , department_id INTO emp_source FROM employees SELECT TOP 10 employee_id , last_name , 2000 AS SALARY, department_id INTO...
דוגמאות קוד – SQL Server Functions

דוגמאות קוד – SQL Server Functions

  ------------------------------------------- -- Functions ------------------------------------------- -- Create / Alter function ALTER FUNCTION dbo.tax_fun (@num_to_tax MONEY) RETURNS MONEY AS BEGIN RETURN @num_to_tax*1.155 END -- Calling it from SELECT...
דוגמאות קוד – SQL Server Procedures

דוגמאות קוד – SQL Server Procedures

------------------------------- -- Annonymous Blocks ------------------------------- DECLARE @v_int int BEGIN SET @v_int = 5 PRINT @v_int END ------------------------------ -- Named Programs -- 1. Procedures -- 2. Functions -- 3. Triggers...