6
votes
1answer
858 views

Renaming SQL Server Agent operator

I want to rename SQL Server Agent operator, that is change it's name. Is this a "valid" thing to do? I noticed that trying to change name in SSMS via Operator/Properties dialog doesn't actually do ...
3
votes
1answer
1k views

Clustered Index vs Primary Key Performance

I'm trying to tune a stored procedure which has a temp table used for matching (only retrieval, no updates or inserts). We're considering applying a clustered key to a temp table. We're also ...
4
votes
1answer
11k views

how to retrieve rows of different dates using IN clause

My table structure: +-----------------+--------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------...
2
votes
2answers
2k views

how to get avg() size by day using two decimal places

does this simple query result in grouping the attachments by day and giving me the total number of daily attachments as well as the average size? the only table i am querying is attachmentdetail (...
2
votes
1answer
1k views

Does mysqld wait for init-script code to complete before opening the instance?

I'm trying to automate the execution of an application code at MySQL startup. The init-file server option seems handy and I need to know if mysqld waits for all the code in the init-file to complete ...
3
votes
4answers
3k views

limiting sql server backups inside .bak file

I have a job scheduled to run a few times everyday. The job backups my databases, like: BACKUP DATABASE [databasename] TO DISK = N'd:\sqlserver\backup\databasename.bak' I can track the backups in ...
2
votes
1answer
69 views

Adding specific information to a local file

I have several files on a webserver (not stored in the database). I'd like to store several information to this specific file. The user should be able to post comments about this file. My question ...
3
votes
1answer
268 views

How to update views outside of update/insert transaction in SQL Server

Looking at SQL Server indexed views I see that these views are updated within a transaction that updates dependent tables. I wonder if there is a way around it? There will be about 10 views with 20 ...
2
votes
1answer
500 views

Divide by Zero Causing Error transaction to fail with Arthimetic Abort and ANSI WARNINGS FALSE after upgrade

This is a strange issue.. We are receiving Divide by zero errors that are causing SQL Server to terminate transaction and crashing the test website. Arithmetic Abort is set to FALSE along with ANSI ...
3
votes
2answers
998 views

SQL Server 2005-2008 Compatibility Check

A few databases were recently migrated from SQL Server 2005 to SQL Server 2008, and I have to check if all the stored procedures, and triggers still work well. With 'checking', I mean that I should ...
4
votes
1answer
6k views

How to create a partitioned table based on date?

I'm trying to create a partitioned table where partitioning is determined by OrderDate. I'm trying to create a clustered index on OrderDate and a nonclustered primary key on OrderID. But I get an ...
0
votes
1answer
5k views

Parameter for Sybase Sql Anywhere 12 Serverport

If SQL Server Anywhere is started via "dbsrv12.exe -z -x tcpip " it opens a Serverport. Default is 2638. If more then one database is opened, the other ones are getting "some" serverports. How ...
4
votes
2answers
119 views

Merge and formatting of data from two tables

I have a table called Slot as follows with default data: 1st Table ================================ | Day | Time | Venue | Free | ================================ | 1 | 0830 | RM 1 | 10 | ...
0
votes
0answers
2k views

Oracle GoldenGate - adding trandata

ADD TRANDATA <table name> will add the supplemental logging to all columns of table if the table does not have either primary key or a unique key. Once we applied the ADD TRANDATA how do we ...
7
votes
3answers
23k views

How to Restore data from binary log

I am trying to restore some lost data , but I am not having its backup .So I am trying to restore from the binary log .Please explain how to restore from the binary log in mysql .
2
votes
1answer
146 views

MySQL Start/Stop

Could anyone explain to me what happens during MySQL startup and shutdown? And i would like to know about the safe startup/shutdown process.
7
votes
2answers
5k views

How to balance SQL Server memory with SQL Server Analysis Services memory

We have many systems that have the same configuration One Server (virtual or physical) Running SQL Server (SQL) and SQL Server Analysis Server (AS) multiple cores 16gb RAM Each night the SQL ...
0
votes
1answer
75 views

Changing column value [closed]

Normally used to MySQL so need help on syntax check. with SELECT * FROM Bit WHERE CustomerID='3512242' I have a field called Filer. I want to change it from a P to a D. Do I use UPDATE to change the ...
4
votes
2answers
227 views

Display all tables and their columns

Is there a way to display the layouts for all the tables to see their columns? I am trying to find tables with a certain column names. I am using the web app Web Data Administrator Example: table1 -...
17
votes
3answers
36k views

Can I use SQL Server Management Studio 2012 on a 2008 server?

My school is using SQL Server 2008. Last time I used it I only installed (at home) SQL Server Management Studio 2008 part, and used VPN to connect to school's server. Now I want to install SQL Server ...
5
votes
1answer
802 views

SQL Server Buffer Pool Utilization under VMWare

I recently migrated a physical SQL Server box (2012) over to ESX (5.1) simply for ease of administration. It is and will be the only guest on the server. As expected there was a marginal performance ...
2
votes
1answer
3k views

MySQL error in where clause : Unknown column

When I try to execute the query below, I receive the error message: Unknown column 'have_discount' in 'where clause' My query is: SELECT DISTINCT(MP.item_id), item_title, item_user_id, ...
3
votes
1answer
426 views

What's the most unsafe MySQL configuration?

I have MySQL 5.5.27-29.0-log instance running specifically for Jenkins. Since tests data is always recreated during setup, ACID is unnecessary and I'm hoping to sacrifice it to gain more performance. ...
3
votes
1answer
6k views

Logging to a file in PostgreSQL windows service

I need an alternative for running the following command: C:\xxx\pgsql\bin\pg_ctl" -D "C:\xxx\pgsql\data" -l "C:\yyy\log\pgsql.log" start. This way the server starts and logs to C:\yyy\log\pgsql.log. ...
5
votes
1answer
2k views

What permissions are needed to view dependencies?

My company is moving to a much more restrictive security model in the near future. As part of that we are changing specific servers to the new model and testing all our existing processes. One of ...
2
votes
1answer
7k views

Installing Oracle 11g XE on Ubuntu 12.04

I have spent the last 6 hours trying to install Oracle 11g on Ubuntu. Obviously, I'm not the only one who has struggled with this, as there is a lot of (often misleading) "documentation" online on how ...
6
votes
1answer
722 views

How does SQL Server order results when joins are used?

How does SQL Server figure out the order of the records in the result set of query execution? I am trying to make heads or tails of it but find myself scratching my head. When I change the fields I ...
1
vote
3answers
6k views

sql server instance using maximum cpu usage

I have a SQL server 2005 instance installed on the server machine with two vm Server Specification are *Processor:* Xeon Ram : 6GB OS: window server on vm ware It is running asp.net application ...
1
vote
2answers
7k views

Import Excel Table to SQL Server - with date column

I'm trying to import a excel table that has a column with dates. My query works without the column date. I'm using ODBC to import. strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ...
2
votes
1answer
2k views

Database Link from Oracle 10g on Windows over to MySQL database

Didn't see any answers on this subject so hoping for a miracle! :-) I've got an Oracle 10g database running on Windows Server 2003 and I'd like to create a database link to an external MySQL database ...
2
votes
2answers
398 views

Database structure for a system with multisite

The system I'm working is structured as below. Given that I'm planning to use Joomla as the base. a(www.a.com),b(www.b.com),c(www.c.com) are search portals which allows user to to search for ...
4
votes
2answers
1k views

SQL Server Dynamic Memory management

I am reading a book on SQL 2008 internals and troubleshooting by Christian Bolton, Brent Ozar and a old book written by late Ken Henderson and I am getting confused and curious about SQL server's ...
1
vote
1answer
633 views

Unable to take backup of mysql database using Xtrabackup

I am trying to take mysql backup without any downtime but unable to take the backup using Xtrabackup . Actual Database is almost about 40+ GB in size. I am trying to first satisfy myself. Hence, I ...
3
votes
4answers
290 views

Does it make sense to use full recovery if the data and log files are on the same HD?

We have a database that was set up to use full recovery and my guess is that the reasoning was only to prevent data loss if a failure happened between full backups. We make daily full backups of the ...
4
votes
1answer
876 views

SQL Server Row Count sp_spaceused rows discrepancy

I am researching a performance problem with an application running on SQL Server 2005. I've conducted performance tuning, and I realize that a key table is poorly structured(poorly chosen clustered ...
2
votes
1answer
342 views

Create Enumerated Function Parameter Type

I want to create a function similar to DATEDIFF in MS SQL Server 2008 R2. The first parameter in DATEDIFF is a datepart. Can I use datepart as a parameter in my function? If not, how do I create a ...
3
votes
1answer
320 views

SELECT multiple sensor values in one query

Background I have a couple of devices, each with a couple of sensors. I log these every now and then and stores them in a table described below. When someone requests a web page, I fetch a couple of ...
3
votes
3answers
6k views

Update field with new string made from characters in existing value

field is meta_value and current value is like 01/01/2006 i want to change it to a string 20060101 so thought i could get the value and update it with the characters in the correct order. ie UPDATE ...
1
vote
1answer
7k views

fundamental difference between Primary/Clustered and Secondary/Non-Clustered index

Are Primary Index and Clustered Index similar in concept Secondary Index and Non-Clustered Index similar in concept
1
vote
1answer
2k views

jdbc: does setAutoCommit(true) commits past executions?

I would like to execute some statements, and commit the entire batch at the end. I've tried the following approach: connection.setAutoCommit(false); // Don't commit for each statement ...
7
votes
1answer
30k views

SQL Server permissions to create, restore, delete only some databases

On MS SQL Server 2008 R2, I need to have user which can create, restore, DBCC CHECKDB and then drop databases. But he must not be able to access or delete specified databases on server (security ...
2
votes
2answers
107 views

Can I see the RAID group name for my SQL Server Database files?

Is it possible to see the RAID group name that my database (and log) files are sitting on, in one of the DMVs (or some other system table) ?
3
votes
4answers
6k views

MySQL unique constraint across two columns

I have a table defining relationships Src smallint(5) unsigned NOT NULL, Dst smallint(5) unsigned NOT NULL, other fields I need to add a constraint that says if a given values is present in one of ...
0
votes
2answers
2k views

Reloading .sql file from java into PostgreSQL - Windows

I am trying to reload a .sql script file into PostgreSQL from my sample Java application. Script is successfully executed from console as well as from pgAdmin tool. But from Java, it hangs... This ...
6
votes
1answer
755 views

DBCC TRACEON (652) does not disable read ahead reads

Refering to this StackOverflow question: http://stackoverflow.com/questions/13307485/sql-server-clearing-cache-has-no-effect-on-io-stats I used the trace flag 652 which had, at the time disabled the ...
65
votes
5answers
17k views

Are SQL Server in-place upgrades as ill advised as they used to be?

I have been working with SQL server on and off since SQL Server 6.5, the old advice that still rings in my head was never to do an in-place upgrade. I'm currently upgrading my 2008 R2 DEV and TEST ...
5
votes
1answer
944 views

SQL Server / MySQL to DTD (+XML)

Is there any way I can at least export a table schema from MSSQL or MySQL to a DTD file? Also the same for the data of the tables to XML. I am really not getting how to write DTDs, so I badly need a ...
6
votes
2answers
4k views

SELECT/INSERT Deadlock

This instance hosts the SharePoint 2007 databases (SP). We have been experiencing numerous SELECT/INSERT deadlocks against one heavily utilized table within SP content database. I have narrowed down ...
5
votes
1answer
2k views

Replicate MySQL 5.0 Master to 5.5 Slave?

We're planning out a series of server/software upgrades and were curious. We have a RHEL5 install running MySQL 5.0 that we'd like to replicate to a new (virtualized) server running CentOS 6 and ...
3
votes
0answers
477 views

“InnoDB: error clustered record for sec rec not found” MySQL 5.5.28

We have a high-end server, 128GB RAM, 32 Core , Xeon, SSD RAID 10 - running Ubuntu 12.04 with MySQL 5.5.28. During high load, randomly we got the below error. MySQLcheck, innochecksum shows no ...

15 30 50 per page