2
votes
4answers
704 views

Should I use a Column naming convention or rely on column descriptions?

Frankly I am stunned that after some basic (very basic) internet searches I have not been able to find a comprehensive naming convention or guideline or SQL object and column naming. The parallel ...
2
votes
2answers
69 views

Best index for this scenario

There is a table in our database tblCustomText( ParentID int NOT NULL, CustomFieldID int NOT NULL, Value char(50) NOT NULL, Log_CreateDate datetime NOT NULL ) (ParentID+CustomFieldID) is ...
2
votes
3answers
3k views

After I replaced master mdf/ldf files, can no longer log in

Today I couldn't start SQL Server process anymore. Reason: The log scan number (213:18:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the ...
0
votes
1answer
759 views

How to manage a large SQL Server database: transaction log, reduce size, alter table

Hello I have some confusion on how to manage a large SQL Server database. Let's say size is 15GB, with 3GB available, in simple recovery mode. Server is not managed by me, I cannot change the size, ...
2
votes
3answers
3k views

Installing Oracle 11g on Ubuntu 11.10

Does anyone know to how to install Oracle 11g on Ubuntu 11.10?
1
vote
2answers
4k views

Why can't I connect to SQL Server 2008?

I initially installed SQL Server 2008 R2 with Windows authentication mode and have successfully changed it to mixed mode (per http://msdn.microsoft.com/en-us/library/ms188670.aspx). After this I am ...
0
votes
1answer
3k views

How to select bytea data as binary data, inserted as hex-encoded from binary

The post How to insert (file) data into a PostgreSQL bytea column was helpful. However, when I select these columns, I get the same hex encoded data. For instance: > select ...
2
votes
2answers
365 views

Data warehouse: using day number in Epoch in a date dimension

In Chapter 2 Retail Sales of Ralph Kimball's The Data Warehouse Toolkit, the author describes a date dimension with three fields which appear totally alien to me: Date Key (PK) Date Full Date ...
4
votes
1answer
7k views

SQL command to remove prefix from a set of tables

I am no DBA. I have a situation with a MySQL database (5.0.51a) where I want to remove a 'dr_' prefix to all tables having this prefix (about 110 tables). I could rename them one by one of course, but ...
3
votes
2answers
5k views

How to monitor SQL Server data and log file growth?

I'm trying to find a way to monitor data and log file size from SQL Server databases (within an SQL Server instance). I would not want to use third party tools, but simply pure SQL or PowerShell. I ...
1
vote
1answer
1k views

When to open your MySQL cursor

A relatively simple question but from all my research I have been unable to find a decent answer. Which is technically more correct, open your cursor after your handlers have been defined or before ...
6
votes
1answer
2k views

SQL 2008 R2 - Odd timeout issues

I'm having some recent timeout issues in our SQL 2008 R2 server. This started occurring late last week and has since somewhat improved. Issues: When using SSMS and right clicking over a ...
1
vote
3answers
2k views

How do I automatically deliver the SQL Server built in reports?

When you right click on a number of items in the object explorer, it gives you the option for a reports menu. Various reports may exist depending on which type of item is selected. Yet, there does not ...
2
votes
2answers
201 views

Space Consumption for SQL Index Rebuild

I am attempting to rebuild the indexes for a single table on a SQL Server 2005 reporting database. The indexes are heavily fragmented as this has not been done for a long time. I am running the ...
3
votes
3answers
3k views

How to run bcp utility from root drive?

My machine does not have full SQL Server installed. The following distributable packages are installed on my machine:- Microsoft® SQL Server® 2008 R2 Command Line Utilities Microsoft® SQL Server® ...
3
votes
2answers
952 views

What is the undo pass that SQL Server does during a RESTORE WITH STANDBY operation?

It's my understanding that SQL Server generates undo files when applying a restore to a database using the RESTORE WITH STANDBY. From the MSDN documentation (Emphasis mine): The standby file is ...
4
votes
1answer
10k views

TempDB data files don't shrink well on SQL 2008

So ideally you want to pre-size your TempDB data and log files appropriately so that this isn't a concern, but sometimes a rogue developer runs a crazy huge query on a production server during work ...
2
votes
3answers
22k views

How can I allow an Oracle database to be accessed remotely?

I have an Oracle database installed on one machine, and I am trying to accessing the same from another machine. I tried via Oracle SQL developer eclipse, and even via JDBC program, butnothing works. ...
0
votes
1answer
2k views

Import .pde file on PL/SQL Developer

How can I import my .pde file which I already exported from another database by PL/SQL Developer?
2
votes
2answers
3k views

Oracle aggregate function performance

Can Oracle be smart about aggregate functions, such as MIN(), MAX(), and (AVG)? My testing shows that it seems to be surprisingly stupid. I have the following query: SELECT COUNT(userId), AVG(age), ...
5
votes
2answers
457 views

SQL Server - DBO without Backup

Similar to my previous Question : Prevent Non Copy Only Backups, how do I create a user that can do everything to my database take backups at all. I've granted them every role except ...
6
votes
2answers
5k views

What Problems Does an Eager Spool Indicate

Currently running on SQL Server 2008 R2 I am attempting to increase performance of an UPDATE statement. I notice an Eager Spool operation in the showplan popping up. My understanding of spooling ...
2
votes
1answer
456 views

Postgres - how to randomize two columns in a table

I have a table of User data which I would like to disguise/anonymize. Two of the columns have location data (e.g. lat and long, both BigDecimals). I have anonymized all the names and other ...
4
votes
1answer
508 views

SQL Express 2008 R2 on Amazon EC2 instance: tons of free memory, poor performance

The old SQL Express 2005 was running on a low-end single Xeon CPU Dell server, RAID 5 7200 disks, 2 GB RAM (SBS 2003). I have not done any baseline measurements on the old physical server, but the ...
1
vote
1answer
340 views

Same restore file (.bak), huge difference of execution duration time on various computers

First of all, the question is nothing to do with SQL performance optimization. I have a .BAK SQL Server backup, and have restored it on my computer. My computer: i7 2600 3.4GHz, 240GB SSD, 8GB RAM, ...
1
vote
4answers
3k views

How to migrate from MySql to HSQLDB?

I have large amount of data in a MySQL database. There are many databases schemas in the database. How I can migrate from MySQL to HSQLDB? Is there some tool for this? I've exported the data ...
1
vote
2answers
1k views

Client to use the slave when the master is down in MySQL replication

Is it possible for the client to use the slave when the master is down in mysql replication? I have already setup a simple mysql replication having a master and a slave. The client connects to the ...
2
votes
2answers
825 views

What effect does serializable isolation level have on DDL-statements?

I'm using Red Gate SQL Compare to create a release script based on differences between SVN and a database. This results in a script containing a bunch of table- and procedure-changes and it works ...
3
votes
2answers
3k views

Oracle Trace File Interpretation: enq: TX - index contention

Background I've got an application which is doing a large number of concurrent inserts into an Oracle table. The Top Activity view is reporting a lot of index contention and I am attempting to reduce ...
1
vote
1answer
96 views

Trying to figure out when a table was dropped? [duplicate]

Possible Duplicate: Determining how a schema change occurred? Using SQLServer 2008, I see in my schema a particular table was dropped. I am trying to figure out when / why etc? Is there ...
2
votes
0answers
53 views

Membase data shared between users [closed]

I have begun writing a website using Membase (php memcached library) and I've come up against a conceptual wall. This is my scenario: I have some data that is stored in a key-value pair which will ...
4
votes
3answers
4k views

SQL Server Collation for Arabic, Hebrew, English and French

I have new SQL Server database which need to have support in 3 different languages. What character sets and collations do I need to choose if I want my database to support the following: Hebrew ...
2
votes
2answers
294 views

Database structure for a mailing list.

I am designing a database structure for a mailing list. The data I need to record is the mail recipient data: Since the mail recipient data is not predefined, it is causing a problem. For example, ...
17
votes
5answers
16k views

MySQL IS NULL / IS NOT NULL Misbehaving?

Please have look at this table: mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | ...
4
votes
2answers
4k views

How to check when statistics was last executed?

We've been having a number of issues with our indexes lately which our DBA team has attributed to statistics not having been run recently. This has made me wonder - how can I check if statistics have ...
3
votes
3answers
911 views

Is there a PostgreSQL proxy running queries on several servers at once?

Let's assume we had PostgreSQL version X.Y and decided to give a test-try to version Z.W. Probably, there are some changes between X.Y and Z.W that could cause a little bit of trouble :-) It would be ...
5
votes
2answers
3k views

Does the max_allowed_packet variable have any effect on LOAD LOCAL INFILE?

As the question states, what (if any) is the effect of max_allowed_packet on LOAD LOCAL INFILE? Does setting it to a large value load data files of large size such as 700MB into the db quickly?
6
votes
1answer
2k views

Is there a more helpful way to detect lock acquire/release stats in SQL Profiler?

Got a few deadlocks happening on our live server, i know, it sucks right. Anyway, i'm trying to figure out how to see what SQL code is causing the locks (or holding it for too long). I've added all ...
1
vote
2answers
229 views

Controlling the order in which merge articles are applied by snapshot at initialization?

I have a replication scheme that was created several months ago. Since that time the schema has had a variety of changes. All existing subscriptions were updated as these changes were made as the ...
2
votes
1answer
663 views

How to serialize a record / row in SQL?

Is there a way to serialize a record/row in SQL? And conversely, to deserialize something that has been serialized. By serialize, I mean put all of the fields in a record into one field or string. ...
1
vote
2answers
422 views

Get the most recently completed step for each SQL job

I'm trying to get a list of jobs and their most recently completed step from the MSDB database. For a single job, this is pretty straight forward, something like: SELECT TOP 1 j.job_id, j.name, ...
11
votes
3answers
4k views

How could sequence.nextval be null in Oracle?

I have an Oracle sequence defined like so: CREATE SEQUENCE "DALLAS"."X_SEQ" MINVALUE 0 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 0 NOCACHE NOORDER NOCYCLE ; ...
10
votes
2answers
2k views

Is there a way to force an index to stay in memory with SQL Server 2008?

I've got a table with several millions rows, from which I need to run some queries from time to time. First query will usually be quite slow (around 10s), and subsequent queries are usually way faster ...
0
votes
2answers
193 views

How to implement Draft functionality, with attached files?

Should allow for: User can save an entity as a draft, that would normally not be valid in its table (ie some missing values) User can attach files to the draft User can find, sort, and discard their ...
6
votes
2answers
2k views

How to implement soft deletes?

What is your method of implementing soft deletes in a database? Ideally the solution would allow for decent performance on large tables take relationships into account take unique keys into account ...
2
votes
2answers
25k views

ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

Couple of days back, I execute shutdown on my DB but it took very long time so I shutdown my m/c. After restarting my machine, I get this exception when I try to connect to my database using TOAD. I ...
3
votes
1answer
500 views

SQL Server 2008 R2 Express - Runs at an average of 2-3% CPU, but gets stuck at 100% sometimes

Edit: Skip to the last paragraph for the summary-version! I am dealing with a SQL Server 2008 R2 Express installation. I have a fairly complex stored procedure. Depending upon the inputs, it may ...
4
votes
4answers
1k views

SQL Server 2008 R2 Standard with SSIS Enterprise

I currently have SQL server 2008 R2 Standard installed with SSIS. I need a SSIS feature that is only available with the enterprise edition. Is it possible to upgrade SSIS only to enterprise while ...
0
votes
2answers
191 views

“Undo” some transactions from backups

Let's suppose that we are planning to execute a "risky action" on a database. Naturally we've tested on non-production databases and everything seems to be fine. We backup the database. Then we ...
4
votes
2answers
7k views

Why is my MySQL dump file and my phpMyadmin export file different sizes?

I am looking to create a cron job to backup my MySQL database. I am using this command: $ mysqldump --user="User" --password="Password" -A --single-transaction > /home/user/Export-`date ...

15 30 50 per page