Daily Archives: October 23, 2009

BCP Utility – using BCP IN in Microsoft SQL Server

In this posting I will show you (BCP IN) how easily you can transfer your data from your operating system file to Microsoft SQL Server database. If you have not read my posting on BCP OUT then click here  BCP Utility – using BCP OUT in Microsoft SQL Server to read it.

The Syntax diagram for the BCP command is shown below:

Continue reading

DBMS_LOCK – Sleep functionality (Procedure) in Oracle

HTML clipboardDBMS_LOCK is an Oracle supplied in-built package which provides interface to Oracle’s Lock management services. Using this package you can lock an object in specific mode, give a name to the lock and release it when lock is no more required.

However the subject of this posting is not locks but Seep procedure in the DBMS_LOCK package.

In most of the programming languages you will find some form of technique where you can wait/sleep for some specified amount of time. This SLEEP/WAIT functionality may be required for different number of reason. For example, suppose you want to insert a record into a table every 5 seconds. In Microsoft SQL Server you will just use “waitfor” command which is a part of the T-SQL programming language. But how will you do that in Oracle. Here is how:.

Example: This example will insert a record in table t_sleep_test. Then wait for 5 seconds. Then insert another record.

1. Create table t_sleep_test

Continue reading



Loading