3
votes
2answers
4k views

Is there a way to tell your hostname within a stored procedure?

Is there a way to determine the hostname of the server you're running in w/ in a stored procedure? You can run system hostname from a client but you can't make system calls from SP. I don't see it ...
2
votes
1answer
6k views

How can I optimize my mysql setup to create my index faster?

I have a server running Ubuntu 10.04 with Mysql 5.1x installed via package. The system has 128GB ram, 8 cores, and has 4TB's free space where Mysql & Mysql tmp are stored. I have an MyISAM like ...
2
votes
1answer
139 views

How to make a table with fields that are other tables in MySQL?

I am making a music library system with php in MySQL. In this system there would be a table named Songs. Since many songs can be by the same Artist (Person), I wanted to store a table of Person that ...
1
vote
3answers
2k views

How to know if Instant File Initialization is enabled?

Besides creating a new database and timing it, is there a simple way to determine whether or not Instant File Initialization is enabled/functioning? (on Windows Server 2008 Enterprise)
8
votes
2answers
7k views

Sql Server 2012 data warehousing and different versions

With Sql Server 2012 there are 3 flagship editions: Enterprise Edition, Business Intelligence, Standard. The full comparison between the three: ...
2
votes
1answer
3k views

How to check the consistency of tables in mysql

I have few questions regarding consistency in Mysql in two scenarios 1th scenario We have two hosts with the same database A and B (the same data, different copy) if there any way to check if the ...
2
votes
1answer
1k views

Mirroring not working after a server crash

I'm using SQL Server 2008R2. Last night, the host machine on which my mirror database was running basically went belly up. Thankfully the principle database was on a different host server and so was ...
1
vote
2answers
7k views

Why does restore take a long time?

Although, the database backup file is only 2GB, the restore can take up to 15-20 minutes even on a x64 12G RAM, i7 machine. When I backup similar sized backup files made from a different database, the ...
1
vote
1answer
80 views

Trim characters from a field but only if it doesn't result in a duplicate?

I have a database of servers and some servers were entered with the fully qualified domain name. I want to rename all of these. However, in some instances the server has been entered both ways. For ...
4
votes
1answer
2k views

Mysql Memory table getting many locks

On my site I log every pageview (date, ip, referrer, page, etc) in a simple mysql table. This table has the following activity: 1 SELECT per minute 1 DELETE per minute no UPDATE queries Lots of ...
1
vote
0answers
68 views

What is the best way to find object dependancies in SQL Server [duplicate]

Possible Duplicate: How can I track database dependencies? How can I know which store procedure or trigger is using a table on SQL Server 2008 R2? I have been using the following SQL on ...
1
vote
1answer
122 views

Can a Database request automatically remove itself from the queue after a delay?

I'm using table locking in my Oracle database. I have a small program with a function that locks my table, does some things and unlocks it again. If many instances are run and requests are made ...
5
votes
7answers
2k views

Recommended tools for SQL Server Developers & DBA [closed]

I was thinking what tools are recommended for SQL Server Developer & DBAs? The list can comprise of free & paid tools which could be helpful to any SQL Server Guy (Developer/DBA). The tool ...
4
votes
3answers
196 views

mysql implementation of ORDER command

Sorry for a silly question, I tried query with WHERE clause and ORDER at the end, which actually took very long time to implement, even thought WHERE clause was on indexed field. It looks like Mysql ...
1
vote
3answers
10k views

The SELECT permission was denied on the object 'syscolumns', database 'mssqlsystemresource', schema 'sys'

MSSQL 2005 sp3 32 bit running on Windows 2003 I have a sql server user MyUser in a database called MyDatabase. MyUser is able to access the MyDatabase database via SSMS. He is also dbo for that ...
2
votes
2answers
2k views

Problem with InnoDB “per table” file sizes

I Have configured the mysql server with innodb per table. There was a table watchdog having approximate 19GB of watchdog.ibd file. I have truncated the table now it has zero record. But the ...
2
votes
1answer
2k views

How long will an index take to create?

I have a table with over 70 million rows in and I have viewed the execution plan which has identified a missing index. I took a snapshot of data a short while ago and created this index on a local ...
10
votes
1answer
3k views

PostgreSQL failover and replication

I'm evaluating PostgreSQL 9.1 and have few questions related to failover and replication details. I have few test scenarios. First one with a Master server and few Slaves. In case Master crashes I ...
4
votes
1answer
281 views

Type safety in WHERE clauses

I've spent the most part of yesterday tracking down a strange bug in our PHP/MySQL application and the culprit seems to be a poor query. We have a table like ...
5
votes
3answers
6k views

How does one scale SQL Server 2008 or 2012?

How does one scale SQL Server 2008 (or 2012)? At its basic, I understand there are two options: Scale up: If CPU bound, I can clearly see going from 1 CPU core to 2 to 4. Or if RAM usage rockets, ...
3
votes
1answer
2k views

Oracle11g password expiry issue

I have a user which has a default profile in oracle db. I want to reproduce the following warning ERROR: ORA-28002: the password will expire within X days In dba_profile I set following values. ...
1
vote
1answer
156 views

How we can enable index_condition_pushdown in MySQL..?

I have optimizer_switch variable as mysql> show variables like 'optimizer_switch'; +------------------+-------------------------------------------------------------------------------------------+ ...
2
votes
4answers
1k views

SQL Server Indexing Performance in Unique/Duplicate column

It is said that if we create index on a column with more uniqueness than performance of that index will be more. But I believe that whether it is unique or not it will occupy same no. of blocks than ...
2
votes
2answers
558 views

Table not shown up on Linked Server

I have a machine which have 2 SQLServer instances WINXP-PRO\SQLSERVER2000 (SQL Server 2000) WINXP-PRO\SQLEXPRESS (SQL Server 2005 Express Edition). In \SQLEXPRESS, I have database wavinet2 and ...
1
vote
0answers
530 views

time interval period in sql [closed]

How to display the time period of the most widely in use in ms sql server I have purchase data, such as: hours the number of purchases 10:00 2 12:00 4 13:00 5 14:00 1 ...
1
vote
1answer
278 views

xtrabackup “failed to read metadata” [closed]

Doing a staging run setting up a new xtrabackup restore script I'm running into a somewhat cryptic error I can't readily google a solution for. I'm working with an incremental backup design. During ...
-3
votes
1answer
271 views

Steps to create instance, parameter file , password file and database [closed]

_Hi everybody _i wanna all steps to create instance, parameter file , password file and database _manually in oracle 10g _i hope from all to help me
3
votes
1answer
1k views

Working across multiple PostgreSQL database servers

So we are writing an app whose schema should reference data which lies currently in an external PostgreSQL instance. We are negotiating being able to put our schema within the external database, but ...
3
votes
3answers
2k views

How do I temporarily disable sp_send_dbmail?

I have just taken over responsibility for a SQL 2000 system which made heavy use of xp_sendmail. We are in the process of upgrading to SQL Server 2008 R2 and I have implemented sp_send_dbmail. ...
1
vote
2answers
89 views

Add more memory to Server?

I have a Dell 2900 Server with 16 GB of memory running SQL Server 2005. All 3 of the databases I have configured on the Server all have the maximum memory allocated to each Database. The primary ...
10
votes
2answers
5k views

PostgreSQL vs. MySQL - Advantages / Disadvantages with a spatial component

We are the in the process of building out a web application that has a spatial data component. In the beginning our spatial data comparisons will take a given point and return matched overlapping ...
3
votes
1answer
139 views

Combined or separated tables: File and Message?

Is this the best approach to design this table in the purpose of sharing the file online between my customer and I, or should I separate Message table and File table or combined them together? ...
2
votes
2answers
890 views

mysql user creation with % to host , can only log on from remote host

Using MySQL v5.1.52 After creating a mysql user with the following commands: create user 'user1'@'%' identified by 'pass1'; grant select on db1.* to 'user1'; flush privileges; Then doing a 'mysql ...
2
votes
0answers
111 views

MySQL MEMORY table has high Lock Wait Ratio [duplicate]

Possible Duplicate: Mysql Memory table getting many locks on my site I log every pageview (date,ip,referrer,page,etc) in a simple mysql table. This table gets very little selects (3 per ...
0
votes
2answers
2k views

Access ODBC reserved error 7711

I have user who is trying to access some tables from our Microsoft SQL Server 2008 R2 system (which very recently got moved to a brand new hardware/software stack) using Access 2007 via an ODBC ...
1
vote
1answer
131 views

Why is replication attempting to distribute NULL values into Identity columns

We are sporadically getting this error: Explicit value must be specified for identity column in our replication environment. I have checked the transaction command that is reporting the error and it ...
0
votes
0answers
424 views

MySql shell command not replicated to slave - “LOAD DATA INFILE” [duplicate]

I have a shell script that looks something like that: #!/bin/bash mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv' INTO TABLE db_name.db_table FIELDS TERMINATED BY ...
0
votes
1answer
215 views

MYSQL - 'Select distinct' - different results on two exact versions of Mysql, databases synced

Same versions of Mysql and the OS (Ubuntu), Databases synced fully. Even the replica gives different results. One mysql instance is showing 11 results (from a Select distinct statement) and all the ...
0
votes
1answer
138 views

oracle local partition index

I have a table like this: CREATE TABLE employees (employee_id NUMBER(4) NOT NULL, last_name VARCHAR2(10), department_id NUMBER(2)) PARTITION BY RANGE (department_id) (PARTITION employees_part1 ...
2
votes
3answers
1k views

MySql shell command not replicated to slave

I have a shell script that looks something like that: #!/bin/bash mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv' INTO TABLE db_name.db_table FIELDS TERMINATED BY ...
2
votes
2answers
5k views

SQL Server Management Studio generates error, can't start

On my development machine, SQL server 2008 R2 was running fine previously. But after formatting OS and re-installing the OS and SQL server, it generates the following error when I want to start SQL ...
15
votes
4answers
6k views

Determining how a schema change occurred?

Something bad happened yesterday. A view that was created sometime back ago was modified by someone which eventually broke the reports. Unfortunately. somebody (knowingly or unknowingly) did this ...
0
votes
1answer
374 views

InnoDB table vs MEMORY table for a mysql environment with many inserts

I run my sites all on InnoDB tables which is working really well so far. Now I like to know what is going on in real-time on my sites, so I store each pageview (page, referrer, IP, hostname, etc) in ...
0
votes
1answer
271 views

FTS - Index rebuild causing CPU issues (SQL Server 2008 R2)

I am encountering some critical issues on SQL Server 2008 in a production environment; We have a database that contains a FTS index; we also have a maintenance job that rebuilds the FTS index and ...
1
vote
3answers
499 views

Should I split a single table with an AUTO_INCREMENT PRIMARY KEY into two tables that can be joined on that PRIMARY KEY?

I have a table that has 46 fields with an AUTO_INCREMENT PRIMARY KEY. It's hard to look at a table that has this many columns, so I frequently use a SELECT statement to look at 34 of the fields that ...
2
votes
0answers
533 views

Is it normal for the SQL Server Profiler SP:StmtCompleted event to give 0 duration?

I'm trying to diagnose a slow running stored procedure in SQL Server. The procedure is quite long and complicated. I have been trying to figure out which statement is causing the issue. I have run a ...
5
votes
3answers
2k views

Setting up Mongo with clustering

I'm going to start using Mongo as a database but I will not have it clustered at first. Can I use Mongo on a single machine, then later come back, cluster it and capitalize on the sharding? Or can I ...
9
votes
4answers
6k views

Adding an index very slow…is there a mysql cmd to get an ETA or show progress?

I'm currently running an alter query on my table (20M entries) in order to add an index. it's running for more than 3 days already (stuck on 'copy to tmp table'). is there a way I can see the ...
7
votes
6answers
2k views

Best way to document database mappings for migrations [closed]

I'm working on a project that includes mapping database elements for a migration and I wanted to know what tools others were using to do this? Excel is a very flexible way to document simple ...
0
votes
1answer
439 views

Boyce Codd Normal Form understanding

I have a knotty (at least for me) problem to solve. Normalize, with respect to Boyce Codd NF, the relational scheme E(A, B, C, D, E, F) by assuming that (A, B, C) is the unique candidate key and ...

15 30 50 per page