2
votes
0answers
431 views

Cannot connect to SQL Server 2008 after updating the service pack

After updating, whenever I start the service of the server in configuration manager, it always stops then. And I found the error in the log 2013-04-13 19:08:19.63 spid7s Error: 15174, ...
0
votes
2answers
192 views

which sql server edition is good for practice [closed]

Which SQL Server (free/trail) would be good to install, which requires minimum resource and have maximum features. I mean, I can practice mirroring,logshipping and replication. I found this link, but ...
0
votes
0answers
217 views

Use cases for NoSQL databases: Time series

I need to set up a database that will record temporal series data (sensors). A friend of mine has recommended me to use a NoSQL database instead of using Oracle (for instance). There're also some ...
0
votes
4answers
1k views

Space at the end of string

I have a SQL code like shown below: declare @str nvarchar(max),@i int set @i=0 set @str='abc ' declare @tbl Table(a nvarchar(max)) insert @tbl select @str while (select a from @tbl)<>'' begin ...
2
votes
3answers
1k views

Can I make sure two columns dont have the same value

If I have a table that looks like this CREATE TABLE foo ( id INT NOT NULL AUTO_INCREMENT, aa INT NOT NULL, bb INT NOT NULL, PRIMARY KEY (id), UNIQUE KEY (aa, bb), CONSTRAINT aa_ref ...
0
votes
1answer
541 views

admin user can not login to other databases after upgrading to mongodb 2.4

I had a mongodb 2.2 database with auth enabled. but after upgrading to 2.4 my admin user can not login to any database other than admin database. I removed it from system.users then created another ...
3
votes
2answers
1k views

How can I improve this nested MySQL query to avoid redundant WHERE statement?

I am trying to improve on a nested MySQL query, using the following table structure (omitting a few dozen not relevant to my question): tbl_users: ID | email (all subscribers to our email list) ...
0
votes
1answer
27 views

mysql error creating table

I was creating a DB with mySQL, and this error appeared: Can't create table 'projectefinal.apuntats' (errno: 150) I've got this: CREATE DATABASE IF NOT EXISTS projectefinal CREATE TABLE IF ...
1
vote
3answers
124 views

Correct way to perform an UPDATE on multiple tables?

This query is working, but I am only just beginning to understand relational tables. I have spent the last few yeas doing all of the processing with PHP after retrieving the data I needed (oftentimes ...
1
vote
1answer
304 views

MySQL: OPTIMIZE after TRUNCATE?

Using MySQL (either InnoDB or MyISAM tables--I have both), if I TRUNCATE a table and then LOAD DATA INFILE, should I issue an OPTIMIZE TABLE call after the LOAD? It's unclear to me if this is a ...
1
vote
1answer
467 views

Service Broker - Communication not happening between servers despite ssbdiagnose saying all is well

I am setting up Service Broker communication between 2 servers, A and B we will call them. I used this article as an example: ...
6
votes
1answer
856 views

How do I optimize large table so queries that target only recent data perform optimaly?

So I have this table that is ever growing. Most queries are targeting just recent data, say one month old. I suppose this is common problem but I have no idea how it can be solved. I am open to ...
1
vote
1answer
85 views

extra steps after changing storage engine and adding index

Someone told me to look into his website for quick optimization; I'm a programmer and i don't have much experience optimizing databases. I have a php/MySQL site uses the MyISAM storage engine. It ...
1
vote
1answer
237 views

Does WITH SCHEMABINDING on a multi-statement TVF improve cardinality estimates?

Based on http://blogs.msdn.com/b/psssql/archive/2010/10/28/query-performance-and-multi-statement-table-valued-functions.aspx and other articles, SQL Server assumes that a multi-line table valued ...
3
votes
3answers
456 views

Which system databases should I checkdb and defrag indices?

I have SQL Server Agent (2005) jobs that periodically perform CHECKDB and a defrag (ALTER INDEX REORGANIZE/REBUILD) of any index that is highly fragmented. These are typical maintenance best ...
1
vote
2answers
2k views

Recursive query in mysql

I am using GetAncestry function found at this post, The problem is when I try to use it with select query Mysql hang, I am not sure why it is happens my Mysql version is "5.5.16" any help appriciable ...
1
vote
1answer
49 views

Best way to perform backups with filegroups and then restore those backups

Scenario: Database consists of these file groups: PRIMARY xxTEST2 xxTEST3 xxTEST4 Database consists of the following files in those file groups: xxTEST_RESTORE - Rows Data - PRIMARY - ...
14
votes
11answers
1k views

Why are constraints applied in the database rather than the code?

Why are constraint applied in Database? Will it not be more flexible to be in code? I'm reading a beginners book on implementing databases, so this is a beginner's question! Let's say I design a ...
0
votes
2answers
468 views

How does mysql transaction works?

I already know how to use transactions, what I want to know is how MySQL transaction handles data being processed... For example, consider the following: 1. I have 2 databases (db1 and db2) ...
3
votes
4answers
1k views

What is the best permissions to set for only creating and managing own databases?

I want to create a login for a new user who could only create and manage their own databases. Other databases on the server should be read-only to that user. What would be a good set of ...
2
votes
2answers
319 views

How to implement posts with “seen by” like facebook?

Inside a Facebook group there is a feature when every time see the group newsfeed it mark all posts as seen by me. And if I see a specific post inside a group thought a url ...
5
votes
3answers
701 views

What could cause the wrong ID to be inserted?

I have a SQL Server 2008 server (build 10.0.5500). Earlier this week I ran this on a table that already had data in it: delete from dbo.table go dbcc checkident('dbo.table',reseed,0) When the ...
7
votes
2answers
732 views

Increasing the decimal precision abruptly increased the size of table

I have a table like: CREATE TABLE grid_rows( [grid_row_id] [int] NOT NULL, [grid_column_id] [smallint] NOT NULL, [decimal_val] [decimal](18, 6) NULL, [datetime_val] [datetime] NULL, ...
4
votes
1answer
339 views

Streaming Replication Failover - how to point second slave at new master?

I have a Postgres database HA cluster I've set up in a lab. I'm using PgPool-II to manage fail-over. For the cluster itself, I have three identical Postgres 9.2 servers set up like so: Server A - ...
0
votes
2answers
7k views

Use CASE to select columns in UPDATE query?

I can use CASE to choose which columns to display in a SELECT query (Postgres), like so: SELECT CASE WHEN val = 0 THEN column_x WHEN val = 1 THEN column_y ELSE 0 END AS ...
-1
votes
1answer
610 views

how cursor implementations are different for each cursor type in sql server

In Oracle, there are only 2 types of cursor i.e. Implicit and Explicit cursor. Which is easy to understand. But, in SQL Server there are 4 Cursor AFAIK i.e. Static,Dynamic,Forward Only and Scroll. ...
0
votes
2answers
574 views

Oracle database uses wrong parameter file

When I try to startup my Oracle database I get the following error: LRM-00109: could not open parameter file '/opt/app/oracle/product/11.2.0/db_1/dbs/initjicdbaex.ora' The /dbs directory in my ...
-4
votes
3answers
958 views

How database administrators can see my requests to SQL Server?

I'm a SQL Server 2008 user. I have access to some tables. I need to request few columns from table as I usually do. But I need to do it once (for example) in 5 seconds and system administrators ...
0
votes
1answer
444 views

Recommended Approach to Programmatically Backing Up/Restoring Oracle DB

Supposing I have an ever-growing Oracle DB on one server, and I want to duplicate this schema and the data on another server - what would be the best approach to achieving this as part of a bespoke ...
0
votes
1answer
380 views

ERROR 1034 (HY000) : Wrong aligned block, while importing in mysql

I got a SQLdump from my database and now I want to import it in to an other mysql server with same version(5.5.22-0ubuntu1) in ubuntu 12.04 .but at the middle of importing, it said: ERROR 1034 ...
-2
votes
1answer
1k views

create database table with a owner in my SQL

Can someone tell me what is the SQL command to create a table with specific owner?
0
votes
1answer
248 views

Database atomic operations implementation

The question is about queries that are not wrapped in 'begin-commit' block, but about plain inserts and updates that are atomic in PostgreSQL, MySQL (innodb engine at least). So how is this ...
3
votes
1answer
584 views

Windows native backups makes SQL Server think that databases backup has been done

community. I've Windows Server 2008 R2 which hosts few virtual machines. One of machines is Windows 2008 R2 server with SQL server 2008 R2 Express installed. Here's the thing: I wrote a script that ...
-1
votes
1answer
66 views

best database for a real estate system [closed]

Which is the best database suits for a real estate system. Considering the storage space, security, crash recoveries, speed etc. There will be around 1000 fields and trillions of rows!!!
1
vote
1answer
359 views

mysql column naming conventions for foreign keys

Lately I've been thinking about what's a better name for foreign keys, either user_id, or id_user style. Personally I think id_user style is better for handling within database (db queries) where ...
2
votes
1answer
57 views

Show all results for past N “insert batches”

Every once in a while I have several users check in with some value: +-------+-------------+------+---------------------+ | id | user | RT | time | ...
1
vote
1answer
231 views

One call to `decryptbypassphrase` for decrypting all columns

If I use ENCRYPTBYPASSPHRASE to encrypt the full table then how can I decrypt full table easily by using DECRYPTBYPASSPHRASE? Actually I have to use DECRYPTBYPASSPHRASE ('passphrase', column_name) ...
4
votes
2answers
2k views

Suspended in index rebuild

In SQL Server 2012, an Index Rebuild job is taking a very long time (up to 8 hours). However, not even one Index rebuild completed, so I stopped the index job. In monitoring SQL task: state = ...
5
votes
1answer
273 views

When REBUILDing indexes on SQL Server, what bearing does tempdb & LOG disk speed have?

Say I have the a data disk that is 50x faster than the LOG and tempdb (measured by Random Write speed) disk. (Don't ask why that's something we'll be fixing if needed) I have a table that's got 19 ...
0
votes
0answers
93 views

Insert performance deterioration over network [closed]

i have a strange issue with a windows application (in delphi) running on a win7 client. The application has a loops and inserts rows on a SQL Server table. It's simply an insert statement, repeated on ...
3
votes
2answers
160 views

Tuning advisor with Extended events?

With SQL traces I was able to analyze them with Database Engine Tuning Advisor to obtain basic recommendations for perf. tuning(missing indexes, statistics,...). Now, with SQL 2012 and Extended ...
1
vote
1answer
2k views

SQL Server bulk insert performance

I’m running sql server 2012 and the installed ram on that machine is 128 GB. The performance of the bulk insert is very low. The bulk insert of 10 million records takes about 2 hours. We have checked ...
2
votes
1answer
251 views

Would using timestamps solve consistency issues with snapshot isolation?

I'm considering using Snapshot Isolation for some large queries being send from an Access 2007 frontend. These queries are occasionally causing ASYNC_NETWORK_IO waits, and some blocking as well. I'm ...
1
vote
1answer
3k views

MySQL my.cnf Optimization

We are an email marketing company and we recently switched our setup to MySQL. We need to configure MySQL (my.cnf) for extreme performance. We have tried to configure my.cnf but heavy queries got ...
-1
votes
2answers
68 views

Column or new table [closed]

I am working on a student management system for a private school. In the table "student" I need to indicate which public school the student came from. Can I just keep this information as a column ...
0
votes
1answer
181 views

Replication Monitor reports little to no latency, but my tracer token is taking hours to go from Distributor to Subscriber

I sent a tracer token through a replication job that was reporting about 2 seconds of latency about two and a half hours ago. I sent the token through because I noticed a row that was inserted on a ...
3
votes
1answer
2k views

Oracle: Full database (user) restore requires drop?

In our development environment (Oracle 11g), we often have to restore databases (users) to previous versions to test upgrades, verify defects, etc. We are using expdp/impdp to perform our ...
0
votes
2answers
4k views

MySQL tuning (my.cnf) for very large tables and ad hoc queries [duplicate]

We are an email marketing company and recently switched our setup to MySQL. We need to configure mysql (my.cnf) for extreme performance. We have tried to configure my.cnf but heavy queries can get ...
3
votes
1answer
307 views

PLSQL : DBMS Jobs - parallelization?

I am looping over a cursor and executing a stored procedure; how do I parallelize this process through dbms.jobs? for rec in select column from table1 loop execute stored_procedure( rec.column ); end ...
7
votes
2answers
1k views

Individual queries run on 10ms, with UNION ALL they are taking 290ms+ (7.7M records MySQL DB). How to optimise?

I have a table that stores available appointments for teachers, allowing two kinds of insertions: Hourly based: with total freedom to add unlimited slots per day per teacher (as long as slots don't ...

15 30 50 per page