6
votes
5answers
4k views

How to search a MySQL database with encrypted fields

Suppose I need to encrypt certain table-fields of a MySQL database. Additionally, I need to search some of those fields I did encrypt. How would one search those fields anyway? Decrypting each ...
0
votes
1answer
1k views

Error restoring backup in sql server. Old server version

When trying to restore a backup file (.bak) to SQL Server installed on my machine, I get the following error (steps that I follow to restore are: Right Click Database ---> Tasks ---> Restore) Error ...
1
vote
5answers
720 views

SQL Server - Database per company. How to query across databases?

We are designing a product that, as per the client's request, must utilize a database-per-company design approach with one shared database holding common data. We are using SQL Server 2012 for the ...
2
votes
1answer
72 views

Preventing concurrent sends of emails from my application

I have a system that sends emails for me and my clients every day in the morning. This process is triggered automatically through access to my website, via an iframe. Often, I receive the same email ...
2
votes
1answer
119 views

I would like to better understand the SQL Server security model in terms of users and groups to possibly replace an XML heirarchy model I am using

I am currently using XML in my database to represent metadata for individual products. I am using the below schema to enter the data. In each sub grouping of fields you will notice the cms_name ...
-1
votes
1answer
306 views

Multiple schema or multiple databases for better performance [closed]

I need to improve the performance of our enterprise .Net search application from the database point of view. The app already has 4 schemas on SQL Server 2008. 2 schemas for front-end operations ...
1
vote
2answers
259 views

Multiple schema or multiple databases for better performance

I need to improve the performance of our entriprise search application(.net) from the database point of view. The app already has 4 schemas on a separate sql server 2008. 2 schemas for front-end ...
2
votes
1answer
1k views

Why is a Star Schema more normalized than a 3NF Schema?

According to Oracle's documentation, third normal form schemas "may require less data-transformation than more normalized schemas such as star schemas". I'm confused, I thought 3NF is the most ...
4
votes
1answer
3k views

Setting up MySQL Cluster on Two Systems

I am attempting to setup a MySQL Cluster. I have the folllowing setup one management node two data nodes another machine on which two more nodes reside Below is the config.ini file: [ndbd ...
13
votes
3answers
7k views

Measure the size of a PostgreSQL table row

I have a PostgreSQL table. select * is very slow whereas select id is nice and quick. I think it may be that the size of the row is very large and it's taking a while to transport, or it may be some ...
6
votes
1answer
3k views

Mirroring - Server network address cannot be reached

I have SQL Server 2008 R2 Installed. It contains three instances. Default (MSSQLServer) First Instance Second Instance All these are Log On as Network Service.. Default Instance is Principal ...
1
vote
1answer
756 views

$nearSphere returns too many data. What am I missing? Am I wrong? Is it a bug? Does other see the same thing?

I noticed that $near and $nearSphere returns completely different data and I got suspicious. After all, when latitude is near equator it sphere distance shouldn't differ a lot from euclidean distance. ...
10
votes
2answers
4k views

Broken NTFS Permissions for MSSQL$SQLEXPRESS

I have been "securing" our database server. To do this I removed some permissions from the folders that the SQL Express install created. D:\SQL D:\SQL\Data D:\SQL\Backup etc.. I kept the ...
2
votes
1answer
462 views

Renaming the Data Sets in SSRS

What is the easier way to rename the Data Sets in completed SSRS report? I have created a report in BIDS 2008 and now for some reasons I have to rename the Data Set names, but it seems that renaming ...
0
votes
2answers
1k views

MySQL how to release memory used up by SELECT

I executed an INSERT IGNORE combined with SELECT from large table. The SELECT took up 16GB of memory and went into SWAP before I terminated it with CTRL+C. INSERT IGNORE INTO sid(sid) SELECT sid ...
1
vote
1answer
383 views

How do I query based on percentages of a subset of values?

I have a table with a column named Type that can have some set of values. For instance, A, B, C, D, etc. Behind the scenes this is mapped to an Enum. I need to query this table to get a percentage ...
1
vote
2answers
204 views

Can graph databases be easily distributed?

I have never worked with graph databases such as neo4j, I would like to know if they support easily replication and clustered distribution as well as key-values databases, or if there inherent ...
4
votes
4answers
8k views

How to list all views in SQL in PostgreSQL?

How do I list all views for a database using an SQL command in PostgreSQL? I would like something similar to output of the psql \dv command, but preferably just a list of view names. e.g., SELECT ...
1
vote
3answers
553 views

How do I copy a view from one server to another?

I want to copy a view from server S1 --> Database D1 to Server S2 --> Database D2. I generated the script by right clicking the database(D1)--> tasks--> generate script. However, when I execute this ...
1
vote
3answers
2k views

Workarounds for setting default schema for domain group?

I am currently working on a project for a client, they have asked me to change the database from Oracle to SQL Server. So we migrated the database across to SQL Server 2008, when this was migrated ...
2
votes
1answer
2k views

How do we free up disk space from allocated namespace? / ORA-03297

We are running out of disk space. The server has a 420 GB HDD, and runs a Microsoft SQL Server and an Oracle Server(10g). The Oracle server uses up to 315 GB space. We have just loaded a 100GB ...
2
votes
0answers
411 views

Grant User Permission To Restore Database And Access that database in sql server?

I want to create a user having dbcreate, db restore server roles and will be db owner of that database. But there is only 1 server roles available that is dbcreator, which can create database is also ...
1
vote
4answers
3k views

mdf,ldf file attach problem?

I've created one database on my local system. consider database name is test. This database primary files are test.mdf, test_log.ldf. and contains ndf files too. Then i've stopped sql server service. ...
0
votes
5answers
65 views

Copy my data from a existing db to a new db

I have a database which has my data's that I have been working for months. Now, I want to delete that db. What concern's me is that the data's that I have might come in handy in the future ...
6
votes
1answer
482 views

CATCH block is triggered when it should not

On my neverending quest for shooting myself in the foot with save transaction I seem to have found even more ways to fulfill the quest purpose. The save transaction clause itself this time is out of ...
1
vote
2answers
327 views

How do I run a SQL Server 2005 job on Windows 7?

I have Windows 7 and SQL Server 2005 Version 9.00.1399. I can successfully create an SSIS Package, however I am unable to execute it successfully as a scheduled job. When I run the job, SQL Agent ...
2
votes
1answer
878 views

MySql - alternate of auto_increment on multiple columns

Since auto_increment on multiple columns is supported in MyISAM engine only and I can't use it because of its drawbacks (table lock, slower writes, no-transacts etc), I am looking for an alternative. ...
0
votes
1answer
6k views

“Operand type clash” with DATE column

I enter the following command into the SQL Server Management Studio insert into testtable ([product_name], [price], [expire_date], [expire_time]) values ('Teapot', 10.00, 23/12/2012, '12:35:00') ...
4
votes
4answers
871 views

Shrink database is not shrinking as much as expected on a 1.5 TB database.

I'm working in an Enterprise system with a 1.5 terabyte database that is on a single filegroup, with the log in Simple Recovery Mode. Since we have many teams working on different projects in ...
1
vote
3answers
614 views

Does Log-Shipping need Transaction Log Backup from Primary Server?

In this video tutorial it is explained that we should use the transaction log backup of the primary server database and restore it into the secondary server database for log shipping. I was doing a ...
11
votes
2answers
2k views

PostgreSQL procedural languages - differences between PL/pgSQL and SQL

Can anybody please summarize the differences between: http://www.postgresql.org/docs/9.1/static/xfunc-sql.html and http://www.postgresql.org/docs/9.1/static/plpgsql.html ? Main points: ...
1
vote
1answer
950 views

IBM DB2 - store large files

I want to store large files in a DB2 database and I need more information about which is the best technique to use as I am new in this IBM product (previous experience with T-SQL only). The ...
16
votes
3answers
4k views

Data obfuscation in SQL Server

What is the best practice for Data Obfuscation in SQL Server? We'd like to use masked Production data in our UAT system. If we want to do it quickly, and with a higher level of obsfucation, what ...
6
votes
2answers
12k views

What is the easiest way to move data from Oracle to SQL Server?

One of our products supports both Oracle and SQL Server as database backend. We have a customer who wishes to switch from an Oracle backend to Microsoft SQL Server, which isn't a typical transition ...
4
votes
2answers
3k views

COUNT and SUM at the same time after removing duplicate rows

I'm using PostgreSQL and I can't figure out a query for doing a COUNT and a SUM of two different columns. Basically I'm looking for something like a SUM(hits DISTINCT record_id) The table: status ...
1
vote
1answer
41 views

Linking Tables Together

If I have a table such as this, CREATE TABLE [dbo].[StreetLight]( [Id] [int] IDENTITY(1,1) NOT NULL, [Description] [nvarchar](50) NOT NULL, [Shape] [geometry] NOT NULL, CONSTRAINT ...
3
votes
1answer
128 views

Analysing A Query Plan

Why is the following query slow? select count(*) from [dbo].[mt_dispatch_link] , [dbo].[_mt_dispatch] [_mt_dispatch] where (mt_dispatch_link.contract_id_1 = _mt_dispatch.contract_id ...
3
votes
3answers
801 views

Set Backup Compression on SQL Server 2008R2 on by default

I can't seem to find the option to set the server property that will enable compression on SQL database backup to be ON by default, so I don't have to manually set it every time. Ca anyone point me ...
2
votes
1answer
53 views

What else does sp_addmergefilter do

I am running the following stored procedure to add a merge replication join filter, sp_addmergefilter What else does that stored procedure do behind the scenes? I am calling that stored procedure ...
6
votes
1answer
245 views

How to Optimise Query

I have a database structure similar to this, CREATE TABLE [dbo].[Dispatch]( [DispatchId] [int] NOT NULL, [ContractId] [int] NOT NULL, [DispatchDescription] [nvarchar](50) NOT NULL, ...
3
votes
2answers
309 views

Query for fetching records from SQLite database on Blackberry

I want to fetch data from SQLite database for Blackberry. There is one table with four columns: ID, FROM, TO, TIME I want to fetch record on the basis of FROM, and TO values. Where condition 1: ...
4
votes
1answer
1k views

Modelling Relationships in an E-R Diagram, Table or Foreign Key?

Should a relationship in an E-R diagram be created in the database as a table or a foreign key? For example: a tutor lectures a class I see it as three possibilities: there is a "lectures" ...
3
votes
1answer
1k views

Oracle integer to number conversion

According to the Oracle documentation, creating a table with a column of ANSI type INT, Oracle will convert it to NUMBER(38). According to the same document, NUMBER(38) is supposed to be a NUMBER ...
3
votes
3answers
4k views

Test MySQL credentials from Linux command line?

How do you test MySQL credentials from the command line on a Linux server?
5
votes
2answers
3k views

Should I create a nonclustered index on all searchable columns or just each column separately?

I am not sure as to properly use non-clustered indexes. The SSMS plan estimator said to add another index when the following index was on the table already. CREATE NONCLUSTERED INDEX ...
5
votes
1answer
622 views

Converting Database from GUID to Integer Keys

I have a medium sized database (~100 tables) that uses GUIDs as primary keys in all tables. In one of our most active tables the GUIDs are causing an unnecessary increase in storage requirements. ...
5
votes
2answers
5k views

I cannot get SQL Server 2012 to install the database engine

SQL Server 2012 installation on a standard Windows 2008 R2 server. It refuses to install the database engine or sql replication. During the installation I got no errors saying that it wasn't ...
1
vote
1answer
359 views

TimeZone parameter in postgresql.conf

postgresql documentation says: All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the timezone configuration parameter ...
6
votes
1answer
726 views

Login to SQL Server 2k8 R2 SP1 via Active Directory Group

I added an Active Directory group as a Windows Authentication Login to our SQL Server 2008 R2 database. When a user who is a member of that group tries to connect to the server he is given a login ...
2
votes
2answers
88 views

Regular Expression Difficulty

I'm trying to extract 456 from the string :123:456: as follows: select regexp_substr(':123:456:', ':(\d+):', 1, 2, 'i', 1) from dual However, this query returns null. What am I doing wrong?

15 30 50 per page