1
vote
3answers
746 views

Find old linked servers on a restored copy of master/msdb db

We moved our dbs to a new server and the drives on the old server are still available, but the SQL service is offline and cannot be started. I want to find the linked servers that were registered on ...
2
votes
3answers
76 views

After server move a query doesn't work anymore

I've moved an ASP+SQLServer application from an old server to a new one. The old one was a Windows 2000 server with MSDE, and the new one runs Windows 2008 with SQL 2008 Express. Everything is ok, ...
1
vote
2answers
1k views

How to install MySQL server on Mac (OS X 10.6.8) from command line?

How to install MySQL server on Mac (OS X 10.6.8) from command line? If I donwload the .dmg file, is it possible to install it from command line?
1
vote
2answers
20k views

ORA-01034: ORACLE not available

I tried to start the listener and do a dbstart, but it looks like it is still saying "Oracle Not available". Maybe the dbstart didn't work. Any suggestions would help me. [user@fedora16 bin]$ echo ...
6
votes
5answers
34k views

How to install SQL Server 2008 R2 Profiler [duplicate]

SQL Server Management Studio doesn't have it on the Tools menu in my case, as is reported in some blogs and forums. Apparently you somehow either got it or not, but how did you get it, if you did, is ...
0
votes
2answers
1k views

MySQL replication fails due to duplicate keys after master is restarted

I'm new to MySQL load balancing, I want to try the master-slave concept. Whenever I setup master-slave for the first time, and both have up-to-date fresh data, that works perfectly fine. However, ...
1
vote
1answer
1k views

Soft delete: Copy row data to archive table when deleting

How can I move data from my current table to an archive table when a delete is called on the table? My current table and archive table needs to be in sync in their schema too. Can someone help ...
6
votes
2answers
9k views

Calculating disk space usage per MySQL DB

I am currently using information_schema.TABLES to calculate the total disk space usage grouped by the database name, but it is running terribly slowly. On servers with hundreds of databases, it can ...
3
votes
2answers
894 views

How to backup a MySQL database without slowing the application?

I'm an application developer and wondering about our database backup strategy. Right now our sysadmins backup our database every 8 hours. I don't really know how the do it, but while the backup is ...
4
votes
1answer
560 views

How to change database owner for login and database created inside stored procedure?

I have a signed stored procedure that creates a new database, a new login and assigns the new user to be the owner of the new database. Well my SProc creates the new login and new database but will ...
3
votes
1answer
119 views

Trace To the Error Log

Thomas LaRock (SQL Rockstar) put up an article on how to write executed commands directly to the SQL Server Error Log without having to use Profiler (or SQL Trace). The article/video can be found ...
2
votes
1answer
163 views

Can I use a Clob as a table key (from Java)?

Following a suggestion made to another question to store large amounts of text: can one use a CLOB as primary key field (i.e., from Java's DataNucleus implementation of JDO)? I know it is probably a ...
5
votes
1answer
10k views

Repairing corrupt SQL Server database backup?

I'm looking at a problem for someone who was backing up to a cloud-based service. Apparently the customer's server crashed while it was performing some maintenance on the cloud-based service's ...
4
votes
3answers
2k views

OCIEnvCreate failed to create environment handle after installing oracle_fdw

I have installed oracle_fdw successfully. After I create extension oracle_fdw and foreign table it shows the following error. Is this a server configuration problem? --env Oracle : 10.2.0.1 ...
1
vote
1answer
624 views

oracle - does this have the potential to cause a lock?

Note how no commit was done in between each statement. Could this cause a table lock or blocked session? delete from tableblah; insert into tableblah (select * from othertable);
-4
votes
1answer
1k views

SQL Server 2000 to 2008 R2

When I try to restore a database abackup from a SQL Server 2000 to 2008 R2m, I get this error: Actually, I don't quite get it. What does the error actually mean? And how can I solve it?
1
vote
1answer
563 views

Unable to connect to MySQL cluster database

I am unable to connect to mysql cluster database after starting my management node, data node, mysql node. I made the necessary changes by adding the loadbalance in the dbURL. But I am not able to ...
1
vote
1answer
1k views

creating a table from a selection and then using group by - oracle sql

I'm working in oracle and I can't figure out what's wrong with this statement. The error it gives me is must name this expression with a column alias CREATE TABLE shipping_costs_grouped AS ...
4
votes
3answers
570 views

Can I query stored procs in all databases with one query without dynamic sql

If I want to query all databases on a server to see if a stored procedure is present, I can combine a sp_executesql and run a cursor over a query similar to the following: SELECT 'select ' + ...
6
votes
2answers
17k views

How to log verbose output from mysqldump?

You typically save the verbose output of a Linux command like this: # command > output.txt But when you use a command like mysqldump, the > option outputs the dump of the database tables to ...
3
votes
3answers
666 views

Database growing like crazy - what do I do?

I have an Epicor 9 ERP database that I recently was put in charge of (new job). Server is running Server 2008 R2 with SQL Server 2008 R2 64bit. The main production database started at 16gb 7 months ...
11
votes
3answers
7k views

How should I configure the RAID array of SSD drives on my SQL Server?

I'm building a SQL Server with 48 GB RAM, 1 CPU, & 8 SATA III (6GB/s) SSD drives (128 GB Crucial m4) and an LSI MegaRAID controller (SAS 9265-8i). I expect the typical work load to be mostly ...
8
votes
2answers
7k views

Table not getting created under dbo schema

When creating tables in SSMS, I've realized that if you execute the following statement: CREATE TABLE [tableName]; the table will be created under your own schema (and not dbo). So in order to ...
2
votes
1answer
47 views

What will happen when a forum uses 24 char length as an URL ID?

I found a forum using self made/custom engine still in beta version, previously using vBulletin. Now, their new engine uses very long URL id, 24 char length. ...
3
votes
2answers
2k views

Get failed SQL Server agent job?

How to get a list of failed job run last night? I only find the following powershell script. What's the SQL equivalence? dir $psPath\Jobs | % { $_.EnumHistory() } | ? { $_.RunStatus -ne 1 }
6
votes
3answers
403 views

Best practices for change management with indexes

Our IT shop is first starting to build a group of DBA's. All of us (myself included) have come over from the application development/architecture world, so the DBA world is still fairly new to us. ...
1
vote
2answers
1k views

Should I put the error handler inside the loop, or the loop inside the error handler?

When a procedure is looping over a statement that could raise an error condition, should I put the loop inside the error handler, or put the error handler inside the loop? I want the procedure to run ...
2
votes
1answer
1k views

Activity Monitor Showing Long Duration for WAITFOR

Using Activity Monitor, I am consistently seeing the following query showing an average duration of over 300 seconds: WAITFOR(RECEIVE conversation_handle, service_contract_name, message_type_name, ...
2
votes
1answer
977 views

ParallelPeriod returning null for Feb. 29 in date dimension

I have a calendar date dimension backed by a physical table of dates (originally created on SQL Server 2000, hence the datetime instead of date): CREATE TABLE [dbo].[PostDate_Dimension]( ...
2
votes
2answers
3k views

How to lock a Row while I'm using it

I want to be able to Lock a row, select it, increment its value, and then release the lock. (without lockin the other rows, so that other connections can work with the rest of the table) I've found ...
7
votes
3answers
7k views

InnoDB table SELECT returns ERROR 2006 (HY000): MySQL server has gone away (after power outage)

This server is a virtual machine running CentOS 6.0, MySQL 5.5.21 There is a database named devSystem. There are InnoDB tables within. Running the following commands causes error ERROR 2006 ...
1
vote
1answer
857 views

MySQL Cluster over WAN: Best Architecture Options?

My company is looking at a multi-data-centre solution for high-availability, fun, and profit. We have businesses across the planet, with the need for MySQL database clustering solutions that can keep ...
5
votes
2answers
3k views

What server property makes TransactionScope escalating to MSDTC?

In our application we're using TransactionScope's. We're aiming to not use the MSDTC service because it's a lot slower than lightweight transactions. using (var transactionScope = new ...
4
votes
1answer
4k views

How can I find who holds the lock based on the hex-dumped?

I've been reading the Diagnosing MySQL InnoDB Locks article. Karl E. Jørgensen writes on 2008 so I'm consfusing it is in effect. I would like to supply a snippet of the SHOW ENGINE INNODB STATUS: ...
2
votes
1answer
4k views

How is INDEX on Composite Primary Key in mysql?

When making a composite primary key for two or more columns, e.g. PRIMARY KEY(col1, col2, col3); will the system INDEX each column individually? The reason that I am asking this question is that when ...
2
votes
1answer
1k views

Why can't I get a lock on an InnoDB table?

I have problem with lock table command: LOCK TABLE v3_cam_date WRITE; the command always running with state: "Waiting for table metadata lock". Try to find out which thread was hold the lock on ...
1
vote
2answers
392 views

How to model double relationships?

Background: I have designed a solution for Filemaker to input data into a Question Database. After we are done with inputting data into Filemaker, we will be exporting the data as excel and ...
1
vote
2answers
561 views

Create multiple files for each file group for table partitioning?

I am partitioning a table by date (month). The server has four drives. The partition scheme is defined as CREATE PARTITION SCHEME ByDate AS PARTITION ByDate TO ( [PRIMARY], [fg2], [fg3], [fg4], ...
0
votes
1answer
264 views

Found errors in table after executing DBCC CHECKTABLE command

I am trying to alter table to add primary key ALTER TABLE GeoCity ADD CONSTRAINT PK_GeoCity PRIMARY KEY(locId) and got this error message Msg 1750, Level 16, State 0, Line 1 then I run ...
2
votes
2answers
115 views

Storing NULL Values in large VARCHAR fields

I have a table that represents a "note". This note has things like a title and various other meta data. However, I'm trying to figure out the best practice for storing the contents of the note. ...
10
votes
2answers
7k views

innodb_file_format Barracuda

I have a couple questions for those more familiar. Most of my instances have been running Antelope despite having support for Barracuda. I was looking to play around with some compresses innodb ...
1
vote
1answer
82 views

Where and with what should I be looking for a good hardware backup tool? [closed]

Until now, I was doing my SQL Backups using USB Hard disk, and copying that to my local computer. After that, I went zipping and burning onto DVDs. Now I want to push that on more professional and ...
3
votes
1answer
525 views

Is the “load data infile” command in MySQL unsafe in general, or just when using statement based replication?

I'm also trying to understand why MySQL considers "load data infile" unsafe and switches to RBR if running in mixed mode, does that mean it is only unsafe when using SBR?
3
votes
1answer
2k views

How do I diagnose missing rows on a MySQL slave?

I'm running traditional master/slave replication on MySQL 5.1.52, my master is set for statement based replication. A few tables are missing rows on the slave (differing row counts), these tables are ...
1
vote
1answer
8k views

Oracle: what permission is necessary to “grant create table” to another user?

What permission should A have in order to grant B permission to create a table? logged in as user A, I execute grant create table to B; and receive the following error: SQL Error: ORA-01031: ...
2
votes
1answer
1k views

how do I limit the characters in selected row and con-cat with '…'

I have a query which return a column named comment. I want to limit the number of characters returned by select statement to 50 and if the comment row contain more than 50 characters, I want to append ...
12
votes
2answers
2k views

Storing massive amounts of data from a sensor array

I have been tasked to implement a solution (app and db) to store the data samples from a huge sensor array. The array currently consists of about 20,000 sensors, but that is soon going to grow, up to ...
8
votes
2answers
21k views

How can I move a MySQL database to another drive?

I'm using MySQL 5.5 on a local machine to analyze a large amount of government data. I've created a local database that resides on my default drive (Win7 C: drive). I'd like to store the data on my E: ...
1
vote
1answer
152 views

Error when tring to get lots of data

When I run the report for a few days then its good. but if I try to retrive data for more then a year then I get this error message. I tried to run DBCC CHECKDB as it says in the error, but after 10 ...
1
vote
1answer
52 views

A few questions regarding Sql Server Utility

I just stumbled across the Sql Server Utility (don't ask) and was just wondering what the overhead of the collect and upload process is like? How does this compare with other monitoring/health tools ...

15 30 50 per page