1
vote
2answers
1k views

Changing the default schema of a user

In order for an application user (APP_USER) to use another schema (SCHEMA_OWNER) without the need for prefixing queries with the schema name, I have implemented a logon trigger that changes the ...
3
votes
1answer
416 views

Oracle to PostgreSQL

I'm having som test databases running Oracle 10 & 11 that I plan to try to migrate to PostgreSQL. Some googling hinted that the perl script "ora2pg" could be of use, and free of charge. However, ...
2
votes
2answers
115 views

Hosting ASP.Net session database on same same instance as the user database?

We have a web farm using SQL Server sessions. We are seeing occasional timeouts connecting to the session DB even though overall utilization is low. The ASPState session database is on the same ...
0
votes
1answer
279 views

Can't connect to MySQL Cluster Storage (data) nodes [duplicate]

Possible Duplicate: Can't connect to MySQL Cluster Storage (data) nodes I've deployed a MySQL Cluster with a few nodes, and I want to access the storage nodes directly from another ...
1
vote
1answer
2k views

Keeping 2 tables in sync

I need to write a trigger that will keep one table synced with 2 other tables. I have table_a, table_b and table_c on slave. The master has only table_a and whenever this table is updated on master, ...
2
votes
0answers
99 views

Can't connect to MySQL Cluster Storage (data) nodes

I've deployed a MySQL Cluster with a few nodes, and I want to access the storage nodes directly from another machine using NDBAPI. When I tried to connect from the same host it worked, but when I try ...
0
votes
1answer
2k views

Upgrading 10g database to 11g database

Is doing a full data export (expdp) from an Oracle 10g (10.2.0.1.0) database and then doing an import of that dump file (impdp) into an 11.2.0.2 database a valid and acceptable upgrade path from 10g ...
3
votes
2answers
2k views

Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users

I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
2
votes
3answers
908 views

Find and remove gaps in sequence across two different columns

I've tried to solve this problem using a set-based approach. However, since I need to look at each row I think I must use a cursor; please correct me if I'm wrong. The table: Project, item, method, ...
-2
votes
1answer
71 views

Who is the original author/creator that took the time to fill/create Northwind SQL server sample database? [closed]

I've used it before, but I never really seen any documentation in SQL server pointing to who actually created it. Is it a person, a group of people? Did Microsoft create it? Who??
1
vote
1answer
2k views

PhpMyAdmin Missing parameter

Everything was working fine until this moment I want to create a new database and I'm receiving this error db_create.php: Missing parameter: new_db (FAQ 2.8) Also when I was trying to export my ...
2
votes
1answer
348 views

FLUSH TABLES stays in the processlist even after execution

Here is my code from Stored Procedures in Mysql FLUSH TABLES; TRUNCATE TABLE tbl_cdrload; TRUNCATE TABLE tbl_cdrdetails_temp; Then i execute a query to load a file in to database as below LOAD ...
5
votes
1answer
1k views

Which mysql storage engine to choose?

I'm confused about which mysql engine should I choose (lets talk about the most used : MyISAM and InnoDB). The theories say: Both work with BTree indexes, but MyISAM can work with FULLTEXT index ...
7
votes
2answers
807 views

Can Availability Groups replace transactional replication?

I've been looking at the new features of SQL Server 2012, and how it can help my current situation. Currently we're on SQL Server 2008 R2, and replicate two OLTP servers' databases to a single ...
52
votes
4answers
31k views

How can I monitor the progress of an import of a large .sql file?

I am importing a 7 GB foobar.sql to restore a table in a local database. $ mysql -h localhost -u root 'my_data' < foobar.sql $ mysql --version /usr/local/mysql/bin/mysql Ver 14.12 Distrib ...
1
vote
1answer
565 views

Finding Duplicates in LEFT JOIN

Here is my table structure: create table table_a (emp_name varchar(100), dept_name varchar(100)); insert into table_a values ('amar', 'finance'); insert into table_a values ('akbar', ...
5
votes
1answer
2k views

In a CASE Statement, which is faster: “WHEN [field] in (0)” or “WHEN [field] = 0”?

I'm looking at a stored proc that another guy has written and every WHEN clause is using an IN statement instead of =. My gut tells me this isn't as fast, efficient, etc. For example: CASE WHEN ...
4
votes
1answer
4k views

I want to know about the IOPS (I/O Per Second) and How it influences the DB CRUD operation

I want to get a dedicated server for my Database (MySQL) which runs InnoDB Engine. There is this option in InnoDB capacity that you can define the IOPS in it. Let's say that I have a SATA 72K-RPM HDD ...
2
votes
2answers
439 views

Is it possable to do a ALL SERVER DML Trigger?

My department works on converting a client's database when a client switches from another company to us. We have a RDP session they can connect to and see our software with their data. Once they ...
0
votes
1answer
857 views

How to convert data from XML format into Excel workbook or database table [closed]

I have some data that is given in a consistent XML format (which I can't change). I would like to import it into a database so that I can work with it, and then search, identify and export certain ...
1
vote
1answer
6k views

Problem with View When Restoring a MySQL Backup

I have a database (InnoDB) with some tables, views and routines... Periodically I do a backup using the command line: mysqldump -u user -ppassword --routines db_name > backup.sql But I have a ...
2
votes
1answer
402 views

PostgreSQL schemas, select same table from all schemas

My app is used by about 80k users every month. I want to create separate PostgreSQL schemas for each user (a-la SaaS, for protection). My app allows users to search other user's profiles, via: ...
2
votes
0answers
4k views

SQL*Plus, @, and relative paths

Somehow, it seems that SQL*Plus (at least on Windows) is unable to locate a script with a relative path when called with @@ and when the path starts with a single or double dot. For example, under ...
1
vote
1answer
4k views

Clarify - Need to add Multiple foreign key constraints

I am not sure if I am thinking about this process the wrong way. Just to Surmise if I create a table(TeamList) whose sole purpose is to capture the coaches team list of players and positions for a ...
2
votes
1answer
584 views

Service Account Groups in SQL Server 2012

I was tracking down some permissions issues on SSRS 2012 and I started looking for the local groups that I am used to seeing for SQL Server. I noticed something I had not seen before, the groups have ...
3
votes
3answers
2k views

View foreign key constraints so I can delete a table

I have copied a database I was working on so I could change some key elements of its design for my new version. I want to delete totally some tables from the database however I cannot due to some ...
9
votes
0answers
4k views

Fast SQL query with * but extremely slow with specific columns? [closed]

We have a query that we're running on SQL Server 2008 in the Management Studio. I can't give the exact query details, but let's say it's equivalent to this: SELECT * FROM MyView a (nolock) INNER ...
0
votes
1answer
259 views

Write Access Client App for SQL Server 2005 Backend [closed]

I'm writing an inventory/payroll system, and I'm storing all the records on a remote server running SQL Server 2005 on Windows Server 2008 R2. I was wondering how I could start writing forms(very ...
1
vote
1answer
664 views

Can you rename or name Reporting Services jobs?

In Report Manager you can create schedules, either shared or one-of's. When you create these schedules a job is created in SQL Server with names that look like guids. IS it safe to rename these jobs ...
1
vote
1answer
641 views

Why do I see sp_OACreate, sp_OASetProperty in sp_WhoIsActive?

I've seen this happen a few times: sp_WhoIsActive shows various sp_OA% sprocs, with my user name, but I'm certainly not running them directly. Does this reflect some kind of query rewrite process? ...
2
votes
1answer
419 views

Can you rename replication jobs?

I have snapshot replication running on three different servers, two publishers and one subscriber. The replication processes have associated jobs (either building the snap shot or grabbing the snap ...
1
vote
2answers
2k views

Restore data from remote server using “.sql” file

I have a ".SQL" file which contains data at a remote server. I could download that file to my local machine and import data in my local DB, but because of network issues, and the size of ".sql" file ...
3
votes
2answers
5k views

what is bigger than a longblob?

the longblob is the biggest data type of Mysql. If I want to save something bigger than 4gb (longblob) how can I do?. I'm talking about Mysql v-5.+
5
votes
1answer
589 views

Including clustered index key in non-clustered index

We're running SQL Server 2008. In looking over the results of a query I ran on sys.dm_db_missing_index_* views, I see a curious suggestion for an included column. I have the following two tables: ...
2
votes
2answers
174 views

Is this Dedicated Server good enough to Run MySQL on Linux Ubuntu?

I have a web application that runs simple logic. Most of the SQL procedures that I have only do simple selects, some simple join table and some simple inserts. I want to get a dedicated server for My ...
15
votes
3answers
3k views

Anybody using HierarchyId in production? Is it reliable?

Is anybody using HierarchyId in real production with tables of reasonable size, more than a few thousand rows? Is it reliable/performant? So far I have not found anyone not affiliated with the vendor ...
6
votes
4answers
2k views

Do I really need to keep .LDF files?

Each month we make an end of month snapshot of our production databse. These month end snapshots are strictly for reporting purposes, there are no inserts, updates or deletes ever done on them. Each ...
3
votes
1answer
2k views

SQL Backups - Full vs Differential vs Log Shipping

I'm looking to refine our SQL backups utilizing Full, Differential, and Log Shipping. Currently, I am only performing full backups once at night. This process is taking so long that it is running ...
1
vote
1answer
634 views

MySQL: Try to Port a Trigger from SQL Server

Here, there's a sample of a trigger with "INSTEAD OF UPDATE" clause: CREATE TRIGGER [dbo].[Test_PTA_Table_Update_trg] -- ALTER TRIGGER [dbo].[Test_PTA_Table_Update_trg] ON [dbo].[Test_PTA_Table] ...
3
votes
1answer
134 views

Thoughts about Oracle backup procedure for 11.2 (beginner question)

Two days ago we "found out" that our old, not taken care of, horribly neglected, Oracle DB server was extremely important to our business. The only person who knew anything about this server was ...
3
votes
2answers
698 views

noSQL ACID and consistency for banking

We are building a real time banking platform and app. Our prime concern is safety and consistency of our data across multiple db servers. We need transactions and we can't afford to risk power ...
8
votes
2answers
2k views

BigInt or Varchar for a large number I won't ever sort / calculate on

I need to store users' Facebook IDs in a column in my DB. The ID always consists of only digits, and can be as large as a number in excess of 500 million. Considering that I won't ever need to do ...
22
votes
4answers
22k views

When is it OK to shrink a Database?

I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming. The list goes on... That being said, say I have a 100 GB database and I ...
1
vote
1answer
1k views

Index Strategies on Text or NVARCHAR(MAX) Fields

I have the following query (simplified for question) I'm trying to speed up for a read only DB ... SELECT [sysid] ,[Date]=CONVERT(CHAR, DATEADD(D, [date], '1800-12-28'),101) ,[From]=[from_addr] ...
3
votes
1answer
3k views

SCD Type 2 Dimension -> Is this the correct layout for a type 2 scd with this type of data present?

Here is an example picture of my layout. As you can see I have my SCD types present (status/startdate/enddate/businesskey). My key is a surrogate key that identifies each record. My problem is ...
3
votes
3answers
3k views

How do I create a user-defined aggregate function?

I need an aggregate function that MySQL doesn't provide. I would like it to be in MySQL's flavor of SQL (that is, not in C). How do I do this? What I'm stuck on is creating an aggregate function -- ...
3
votes
1answer
232 views

Optimizing queries against a set of tables that contain partitioned data

I have a third party program that creates and populates a series of tables to hold some historical data: data_33 -- contains data for 12/01/11 - 12/05/11 data_34 -- contains data for 12/05/11 - ...
7
votes
4answers
6k views

Select statement takes long remotely due to long “client processing time”, but short locally

While connected to our production server (SQL2008. very powerful machine), this select statement takes 2 seconds, spitting back all fields (4 MB of data in total). select top 30000 * from person ...
3
votes
1answer
6k views

SQL Server 2008 R2 on Windows 7 x64 Professional - what are the downsides?

I need to minimize the cost of the platform, that will run SQL Server 2008 R2 Standard Edition. I have a special licensed version of this SQL server to work with like 20 users (it's an 1C special ...
0
votes
2answers
935 views

schema analyzer tool [closed]

I am currently using TOAD to connect to the database. I have around 20 tables that I have been asked to analyze ( I am new to project ). I think the first place to start is to understand the relation ...

15 30 50 per page