Tag: oracle

How to get the list of java processes along with their PID(process id) that are running on UAT server under a specfic account?

Problem: A jar file was failed to deploy on a UAT server. Reason: Because when we are trying to rename it,it is showing “cannot rename the file it is been used by another user”. step choosen in order to solve the problem log on UAT server(xxx). we need the list of java processes along with […]

How to convert this t-sql script?

I am unfamiliar with Oracle and i need to have equivalent of my script for Oracle. Script: SELECT COL_NAME(parent_object_id, parent_column_id) AS ForigneKeyField, COL_NAME(referenced_object_id, referenced_column_id) AS PrimaryKeyField, OBJECT_NAME(referenced_object_id) AS PrimaryTable FROM sys.foreign_key_columns WHERE parent_object_id = OBJECT_ID(@name)

Queries for Sql Server and Oracle

I’m developing an asp.net application with Database factory pattern which allows the application to support both Sql Server and Oracle. I’ve created an abstract class that has the methods common to Sql Server and Oracle, like the CreateConnection and CreateCommand methods. This class is implemented by SqlServer and Oracle classes. Now, is there an easy […]

SQL to query the maximum number of available items for a specific period (reservation system)

For a reservation system there is an inventory table and each item has a quantity (e.g. there are 20 chairs). Now the user can make a reservation for a specific period (e.g. 5 chairs for two hours “2010-11-23 15:00” – “2010-11-23 17:00”; another reservation could be for several days “2010-11-24 11:00” – “2010-11-26 14:00”). What’s […]

Is there an automatic way to generate a rollback script when inserting data with LINQ2SQL?

Let’s assume we have a bunch of LINQ2SQL InsertOnSubmit statements against a given DataContext. If the SubmitChanges call is successful, is there any way to automatically generate a list of SQL commands (or even LINQ2SQL statements) that could undo everything that was submitted at a later time? It’s like executing a rollback even though everything […]

Populate an SQL Server 2k8 with Oracle Loader files

Here’s the problem: I have a project that needs to be migrated to Microsoft SQL Server 2008. We have data in text files for the Oracle SQL Loader and now we need to get that data into the SQL Server DB. I could write a program that converts everything into INSERT statements but there has […]

Database performance benchmark

Any good articles out there comparing Oracle vs SQL Server vs MySql in terms of performance? I’d like to know things like: INSERT performance SELECT performance Scalability under heavy load Based on some real examples in order to gain a better understanding about the different RDBMS.

how can I update the record in this case?

I am storing the various activities with id’s as 1,2,3,4 consecutively. If I delete the 2nd record (id 2), how can I update so that 3 becomes 2 and 4 becomes 3? Thanks in advance

how to overcome the limitation of IN cause in sql query

I have written an sql query like : select field1, field2 from table_name; The problem is this query will return 1 million records/ or more than 100k records. I have a directory in which I have input files (around 20,000 to 50,000 records) that contain field1 . This is the main data I am concerned […]

SQL Query (pl/sql) for a complicated logic

I have been stuck with this problem for a while. First I will explain the table structure There are four tables in my system Domain Columns: DomainID (primary key) DomainName Data: DomainID DomainName 1000 Google.com 2000 mySql.com WebPage Columns: WebpageID (primary key) WebpageName DomainID (FK from domain table) Data: 5001 SearchPage.html 1000 5002 Welcome.html 1000 […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.