Krystian Zieja's blog
By Krystian Zieja on July 1, 2009 - 12:26
Oracle SQL*Plus has a neat feature called AUTOTRACE, which enables us to get execution plan and additional statics about the running SQL statement. The main difference between AUTOTRACE and EXPLAIN PLAN is that AUTOTRACE actually executes the SQL statement. AUTOTRACE can be a helpful tool in Oracle Developer or Oracle DBA hands to check performance of SQL statements.
By Krystian Zieja on June 30, 2009 - 00:35
Sql Server Administrators often face a problem when working with some application, in which their developers decided to store dates as integers. In those applications the dates are stored as integers in format YYYYMMDD. This post will illustrate how to convert YYYYMMDD format to smalldatetime data type and back on Microsoft Sql Server.
By Krystian Zieja on June 23, 2009 - 10:43
ORA-01536: space quota exceeded for tablespace is a common error in Oracle Database.
It means that users is trying to use more space than the Database Administrator assigned to him. Quota is a maximum number of bytes that a user can allocate in particular tablespace. Implementing quotas in database is a reasonable approach because it prevents buggy or malicious code to fill the tablespace.
By Krystian Zieja on June 19, 2009 - 12:33
Sometimes Mail Servers administrators have problem with receiving mails. One of the first things to troubleshoot is the MX record of their mail server in DNS. We can do it by using many online services or by using simple tools like nslookup or dig. One thing to note dig is Linux utility, while nslookup can be found on both Windows and Linux systems.
By Krystian Zieja on June 18, 2009 - 00:04
Often we need quickly check the version of the Microsoft Sql Server. The quickest way to do it is to use @@VERSION. However there is one more method, which is often overlooked by Database Administrators, the extended stored procedure xp_msver.
By Krystian Zieja on June 13, 2009 - 23:46
Sometimes Oracle Database Administrators receive some strange requests like dropping or truncating the same table in several schemas. Obviously we can do such requests manually, but it would be time consuming and very hard to automate. Instead of performing such requests manually we can use a handy script.
By Krystian Zieja on June 11, 2009 - 11:29
Sometimes we want to disable user access to database without deleting or detaching that database. The easiest way to do it is to take database offline. Taking database offline can be performed using Transact-Sql or Sql Server Management Studio.
By Krystian Zieja on June 9, 2009 - 00:52
When preparing the Sql Server Migrations or performing audits is to list all database files on the server. One way to do it is to go to each database and query sysfiles. However this approach is not too handy where we have many database on a server.
By Krystian Zieja on June 7, 2009 - 00:44
It is quite often asked question how to select only numeric data from character based column. Using Sql Server makes this task usually easy, you just need to use IsNumeric function.
create table t1(
c1 varchar(10)
);
insert into t1(c1) values('Krystian');
insert into t1(c1) values('10');
insert into t1(c1) values('13.5');
insert into t1(c1) values('- 13.5');
insert into t1(c1) values('100.25.55');
select * from t1;
Krystian
10
13.5
- 13.5
100.25.55
By Krystian Zieja on June 4, 2009 - 10:48
Let's start from some theory, "what is unix timestamp?".
The unix timestamp is the way to measure time as a running total number of seconds after Unix epoch. Unix epoch started at 1st, January 1970 00:00:00 UTC. The often asked question is how to convert Unix timestamp to Oracle date.
Recent comments
48 weeks 6 days ago