dba

SQL migration tool

I want to write a SQL migration tool. This tool must: merge new scripts in a folder, validate the merging of those scripts, run those scripts against a database. if a validation error occurred, then highlight the invalid rows. if the script was successful deployed, I want to save this information in a database with the version and ot...

Code to validate SQL Scripts

How i can validate sql scripts before executing using .net2 and c#. If sql is not valid i want to return error rows. ...

How to kill/resolve a reeeeally long-running update in SQL Server

A colleague of mine (I promise it was a colleague!) has left an update running on our main SQL Server since last Thursday (yes that's right folks, we're pushing 100 hours now!). The SQL in question (in one transaction, I might add) is: update daily_prices set min_date = (select min(a.date) from daily_prices a where a.key ...

Transaction Locked Down SQL Server 2005

Hello Guys, I have noticed something over the last few months. Each time we run a script that has a transaction statements let say we stop the query unexpectedly this action actually lock the database. The only way out is to destroy the transaction each time. I have never experience this before even though I have stopped the query in t...

Monitoring Oracle DB remotely

I would like to know how to do this: Environment: UNIX I would like to write a script which can be scheduled to run on a remote machine. It would read the DB details (which is residing on another machine) from a config file which looks like this: user= pass= product1_SID= product2_SID= ... Each product has its own database files. So...

Is there a reason MySQL doesn't support FULL OUTER JOINS?

Is there a reason MySQL doesn't support FULL OUTER JOINS? I've tried full outer join syntax in mysql many times and it never worked, just found out its not supported by mysql so just curious as to why? Thank you inadvance;-) ...

Getting started with DBA

Hi I am java professional since last one year, now I like to move with Oracle and preparing for OCA exam. I like to know the combination of oracle and Java in IT market. Being a DBA will my Java knowledge be helpful. Thanks ...

Question on AdventureWorks DB...What is the point of rowguid in a lot of the tables?

So I think I already know the answer to this question... Running AdventureWorks2008 (latest version) on mssql server 2008. I am thinking that the rowguid column in a lot of the tables is to ensure that there is a primary key. I am probably dead wrong as the column appears to be a constraint. Correct me if I am wrong and also please cor...

Postgresql vs. MySQL: how do their data sizes compare to each other?

For the same data set, with mostly text data, how do the data (table + index) size of Postgresql compared to that of MySQL? Postgresql uses MVCC, that would suggest its data size would be bigger In this presentation, the largest blog site in Japan talked about their migration from Postgresql to MySQL. One of their reasons for moving aw...

Can't connect on oracle unless DBA

I just created a new user, it DOES have create session, but everytime i try to connect on PLSQL Developer I get ORA-00604, ORA-01722 and ORA-06512 However, if i grant DBA access, i can log on with no problems. Hints? I don't have any connection trigger. ...

Aqua Data Studio: Logs - who changes smth in db: data in table, or changed proc

How can I see logs, using Aqua Data Studio (I'm using MSSql db) - I need to see last change for a concrete table or procedure? And I can't add any security logic - only use default settings. I`m guessing there should be some global log, that is saving all changes, made to db. ...

Are there any pitfalls with having multiple MySQL databases on 1 server node?

I want to prepare my database for sharding in the future. But right now I only need 1 node. What I'd like to do is to shard the database into virtual shards, say 12 shards, and put all of them onto the same server node for now. And when I need to scale out, I could just then get a 2nd server and move 6 of the 12 virtual shard onto the ...

Oracle Variable substitute - Synonym

I want to substitute a variable in oracle. The var is coming in via SQLPlus and is reference using &1 &1 in my scenario is the schema name - here's the SQL. CREATE SYNONYM ACCOUNT FOR &1.ACCOUNT; Assuming &1 equals ABC the synonym created is for ABCAccount, instead of ABC.Account. For some reason the period is removed. Any ideas w...

How can I control log switches and checkpoint frequencies?

What are the differences between LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT? I need a clear picture of volume based intervals and time based interval. What are the relations among LOG_CHECKPOINT_TIMEOUT,LOG_CHECKPOINT_INTERVAL and FAST_START_IO_TARGET? ...

How can I connect to ORACLE DB through ssh tunnel chain (double tunnel, server in company network) ?

Hi, I have SSH access to 'public' server, which is also the gateway to company network. There is another server in the network, where local ORACLE server is running (There is no access from outside of this server, only localhost DB connections are accepted). And of course, I have another SSH access to this server. Is there any way to j...

How much network knowledge does a SQL Server DBA need to have to do their daily work?

How much network knowledge does a SQL Server DBA need to have in order to do their daily work? Are their any good resources to recommend? (websites, books, blogs etc) ...

Best place for PostgreSQL 9.0 training.

Looking to find a good online or on-site training program for PostgreSQL especially dealing with the just released 9.0 . Basically looking at training that focuses on DBA functions, provides optimization techniques and offers insight into new functions of PostGreSQL 9.0 such as Hot-spare... ...

How to find when a table was last accessed/updated for SQL Server 2000 sp4

I need to find if a certain table has had any activity(update/query). Is there are way to find this information in SQL Server 2000 (sp4 to be specific) There is a helpful query using sys.dm_db_index_usage_stats, but it is supported only post SQL Server 2005. I am looking for something similar on SQL Server 2000. Thank You for your time...

Can a DBA find performance issues just from reading the TSQL code?

Can a DBA find performance issues just from reading TSQL code? Is a DBA expected to have that capability? ...

Shrinklog all user databases in SQL2008

Hi I am using this script in the process of weekly maintenance, suggest best approach/scripts to do shrinklog. Currently am getting an error with the below script declare @s nvarchar(4000) set @s= ' if ''?'' not in (''tempdb'',''master'',''model'',''msdb'') begin use [?] Alter database [?] SET...