All Questions

Filter by
Sorted by
Tagged with
5
votes
1answer
2k views

Nested queries or temp (#) tables in SQL Server

I have written a web application which aggregates and presents data from a SQL Server. The data involved is large, and there is a lot of aggregation involved. Currently, under advice from an 'expert' ...
1
vote
1answer
98 views

Basic sql query problem [closed]

Here is the scenario: lets say I have a database named sqlprac that contains a table named dept. There are two ways to write a query: use sqlprac /*1*/ SELECT dept.deptno, dept.deptname, ...
6
votes
2answers
29k views

MySQL Replication Error

I am getting an Error on Slave as: could not execute Write_rows event on table mydatabasename.atable; Duplicate entry '174465' for key 'PRIMARY', Error_code: 1062; handler error ...
4
votes
3answers
42k views

How to create and send mail in SQL Server 2008?

I want to send E-mail from SQL Server 2008. What are the basic steps for that? Can you explain me if someone used this facility. Any help will appreciated. this link will helpful as commented by ...
15
votes
5answers
3k views

Inclusion of ORDER BY on query that returns no rows drastically affects performance

Given a simple three table join, query performance changes drastically when ORDER BY is included even with no rows returned. Actual problem scenario take 30 seconds to return zero rows but is instant ...
20
votes
7answers
18k views

Does a DBA need to know how to program in a system language besides SQL?

To what extent does a Database Administrator need to know system or application level programming languages (for example .NET or PHP) besides "just SQL"? For the purposes of this question, no ...
4
votes
1answer
2k views

How to UPDATE just one record in DB2?

In DB2, I need to do a SELECT FROM UPDATE, to put an update + select in a single transaction. But I need to make sure to update only one record per transaction. Familiar with the LIMIT clause from ...
4
votes
2answers
4k views

Microsoft SQL Server 2008 Memory

I am running MSSQL 2008 Enterprise and in the configuration of the server the Max memory amount is set to 2147483647 MB. My Question is, the server has 192 GB of ram,the number in the config can't be ...
6
votes
4answers
2k views

Four db servers all identical, one is much slower than the others

The setup We have an application loading a lot of transaction data for later querying. It's sharded on 4 SQL Server 2008R2 Enterprise Edition on Windows Server 2008 64 bits. All servers are ...
6
votes
2answers
4k views

Is there a way to ensure that a SQL Server trigger will be executed?

My supervisor is hesitant to use a trigger in a process because if there is a network interruption at just the right time, the process would not complete. Does SQL Server include the trigger in the ...
3
votes
3answers
10k views

Select Which Database Mail Profile is used in SQL Server 2008 R2

I am confused about Database mail profiles in SQL Server 2008 R2. When setting up severity notifications as well as "notify operator tasks" in maintenance plans, what determines what mail profile is ...
3
votes
1answer
2k views

fetching externally hosted db's table from within the local mysql server

Let's say we have a mysql database on localhost with table A and table B. Is it possible to fetch details from a 3rd party mysql server to which we have login info and which allows external access? ...
5
votes
1answer
10k views

MySQL Slave replication: Need to determine where replication left off to start slave in correct location

Idiotically I rebooted a machine that is used as a MySQL slave without running STOP SLAVE, FLUSH TABLES first. I had thought MySQL automatically handles all of this during a machine reboot, but ...
7
votes
4answers
18k views

Shrink database after drop table?

I had a table with 70+ million records in a SQL Server database, I dropped that table (a one-time thing) to free up space on the disk, but it looks like the size didn't change much. I do see that I ...
2
votes
4answers
2k views

Does a full transaction log cause a rollback?

Will a transaction that is trying to write something into the transaction log be rolled back if the transaction log is full?
3
votes
3answers
1k views

Why does 'sysfiles1' show up in the sys.objects catalog view in SQL Server 2008?

We were recently using this query to find tables in our database that didn't have clustered indexes and found that one of the results it reported back was the 'sys.sysfiles1' table. We're running SQL ...
2
votes
1answer
4k views

How to make it impossible for a postgres user to delete databases?

What yould be the sql statement (that the user postgres will execute) so it will be impossible for the postgres user user1 to delete (drop) databases? Or can I add a rule into some config file?
3
votes
2answers
547 views

How to check the pre-allocated database file of MongoDB is Used or not?

We have been using MongoDB for a few weeks. One thing we could not understood is Pre-allocated file. Is there any way to check whether the pre-allocated file is currently used by MongoDB or not? We ...
3
votes
1answer
3k views

Has somebody got a function that will extend hashbytes to strings of arbitrary length?

I want to apply it to procedure definitions. My basic idea is to split the string of type nvarchar(max) into chunks of nvachar(4000) and concatenate the results of HashBytes('MD5',chunk). I can't ...
5
votes
1answer
658 views

Replication of database used by two programs

I have a peer to peer transactional replication set between two identical databases, each one of the databases is being used by a different program on two different servers. Since we implemented the ...
6
votes
7answers
1k views

Database table and NULLs

I know that there have been many opinions/sides concerning NULL values in a database. I have not understood though what is the best practice for this. I.e. if I have a relational table with an ...
3
votes
2answers
809 views

get column from too many tables in mysql

.I have too many tables X1,X2,...Xn (they might exceed 75 tables) in Mysql DB to represent departments of a very large company. every table has structure something like this desc X1; +---------+------...
2
votes
1answer
3k views

Why is mysql logging to syslog?

I have installed Multiple MySQL instances and i have two configuration files one for each one is using default location of /etc/mysql/my.cnf. other server i have started like root@ABC-240:/usr/...
19
votes
6answers
52k views

How to prevent transaction log getting full during index reorganize?

We have multiple machines where we have pre allocated the size of the transaction log to 50gb. The size of the table that I am trying to reorganize is 55 - 60 gb but is going to continuously increase. ...
0
votes
1answer
1k views

Database design : multiple category of users login into same system

In our new system we have three type of people Business owner Assistant of business owner Staff (a skilled employee) I am having following entity [Business] - include detail about business owner [...
15
votes
2answers
20k views

Most Efficient Way to Retrieve Date Ranges

What's the most efficient way to retrieve date ranges with a table structure like this? create table SomeDateTable ( id int identity(1, 1) not null, StartDate datetime not null, EndDate ...
3
votes
4answers
7k views

Can I specify a different disk for a specific MySQL table?

I use my home machine as my personal database for my hobby analytics project. This machine has an SSD for the main drive where MySQL stores its data. It also has a secondary hard drive that is ...
3
votes
1answer
3k views

Is it possible to automate the configuration of dataguard broker?

We deploy a number of oracle databases every year and a good percentage of them require a dataguard configuration. I've developed a script which is able to perform the database synchronization very ...
5
votes
2answers
2k views

Repartition Primary Key Index online in Oracle

I have an 24x7 OLTP (11gR2) application that endures heavy inserts on particular tables, traffic has increased to the point where we are getting heavy index contention. We use sequences for the ...
5
votes
3answers
3k views

How to select a subset of data from a large ER model?

I have a quite large ER model in my database and lots of data. Now I would like to take a subset of this data into a different database for testing purposes. The problem is how to get a subset from ...
14
votes
3answers
11k views

How to convert mysql to postgresql? [closed]

I am desperately looking for a conversion tool to convert a big mysql database to postgresql. I need the tool/script to be: Free Works under Linux Simple to use and not buggy You actually tried and ...
1
vote
1answer
1k views

Insert bulk Parent and Children rows using SQL Query

We receive bulk data from our customers in a spread sheet. I loaded them in a temporary table as of now. I tried to normalize the data and create a parent table and each parent to have 4 or 5 child ...
5
votes
4answers
6k views

What is a good way to verify that a restore completed successfully in SQL Server?

Right now, we test our SQL backups once a month by pulling the most recent backup file and restoring it onto a test database. If SQL Server says the restore is successful, we spot-check a few tables ...
5
votes
2answers
395 views

SQLAgentReaderRole and SQL AD ID login case affecting ability to edit jobs

I have AD ID users on a SQL 2008 server that can't edit their own jobs. They can create them, but in order to edit them, they have to delete them and then re-add them. The issue is explained here: ...
1
vote
2answers
1k views

Can I send a string over TCP using T-SQL?

I've set up some alerts, based on this article Now I would like the Job that is triggered by the alert to send some information to a c# application (this application, can be running in the same ...
2
votes
2answers
111 views

Retrieve job Details in SQL Server 2005

How do I retrieve information about a SQL Server Agent job scheduled against databases on SQL server 2005?
10
votes
6answers
21k views

Reconnect mirroring server SQL Server 2008 R2

The failover server has status (Mirror, Disconnected, In recovery) and principal server has status (Principal, Disconnected). What is the process to reconnect these servers?
4
votes
5answers
14k views

Copying Oracle 11g express Database from one server to another

Basically, I am a MS-SQL developer,and relatively new to Oracle. Even after great deal of research, I was unable to find any way of copying entire database from one server instance to another. In ...
2
votes
2answers
207 views

Setting up a table with a calculated column

I'm setting up a table in sql server 2008. It going to hold three columns (busTime, trainTime, carTime). I want these columns to hold the amount of time a user spends traveling per day. I then want to ...
3
votes
2answers
8k views

Mysql consumes a lot of memory

Here is my situation. I have an ubuntu server monitored by nagios. recently nagios sends alarms regarding the memory consumption on the server. I logged into the server and executed the top command ...
4
votes
4answers
15k views

Optimized my.cnf for high-end and busy server

Curretly my main culprit of poor performance is MySQL and I'm not a DB savvy. So far, I've had little luck in optimizing mysql configs on my server, which has a Sandy Bridge processor with 16GB ram ...
1
vote
2answers
106 views

Installation problem in SQL server 2005 [closed]

Does SQL Server 2005 Express have a problem with installing on single user systems?
6
votes
1answer
6k views

what are the conditions under which mysql replication might break?

I am running mysql server in master/slave configuration mode. There are multiple slaves replicating from a master. They are working fine and their replication status is monitored. One of the slaves ...
3
votes
3answers
2k views

Changing a column's data type fills the transaction log

Running this code: ALTER TABLE npidata ALTER COLUMN npi varchar(20) Gives this error: Msg 9002, Level 17, State 4, Line 2 The transaction log for database 'SalesDWH' is full. To find out why ...
1
vote
4answers
2k views

RAM/memory based databases

I am looking for a RAM/memory based database, and these two seem to be interesting: SQLite Oracle Berkeley DB Do you have any other suggestions? I need more than one executable to be able to ...
5
votes
1answer
840 views

Database as a service (DbaaS) over dimensions--performance, scalability, & reliability?

MySql Database as a service: Amazon Xeround Another eg. PostgreSQL Database-as-a-Service. You can get the list of similar products here. Does anyone have details on their performance, reliability, ...
5
votes
3answers
5k views

Job Schedule view

I'm trying to create a view for a report so that I can easily keep track of all of the backups that I have scheduled on a server. All of these backups are scheduled in subplans of a maintenance plan, ...
2
votes
1answer
3k views

Postgresql 9.1 replication delay

I just set up a PostgreSQL 9.1.2 database server on debian squeeze. I configured a standby server (hot standby) on a second identical server (squeeze, PG 9.1.2). On the master I set these parameters (...
2
votes
1answer
2k views

Cannot view sql server agent in sql server 2005?

I have installed full setup of SQL Server, and start the service for SQL Agent through SQL Server surface area. But still I can't get SQL Agent tree node in my SQL Server connection treeview. So ...
3
votes
1answer
205 views

SQL Server 2008 Failover cluster

We are currently running a working SQL Server 2005 Failover cluster, with 2 nodes. We are now in the process of replacing the servers in that cluster with 2 new servers running SQL Server 2008, my ...

15 30 50 per page