1
vote
1answer
109 views

Select ``,* from table?

I'm trying to upgrade our database servers to MySQL 5.5. In doing so, I'd like to convert all of our tables to InnoDB to take advantage of several performance benefits. However, we use VARCHAR(50) ...
1
vote
1answer
5k views

Arabic characters not displaying in oracle database

We have a Oracle database 8.1.7 running for many years on Win-2000. We wanted to move the database on a newer machine running Win 2003. I did the following I made a cold backup of old database. ...
4
votes
1answer
105 views

How do you manage a list for particular object. for eg. user comments on specific object(user post etc.)

I am new to database and web application development. I want to know how to store a list for a particular object in a database. For example, user comments for a particular post(object), or the ...
9
votes
4answers
2k views

How to check if a subquery has exactly one distinct result and a specified value concisely?

I found myself writing the following: select 'yes' where exists(select * from foo where val=1) and not exists(select * from foo where val<>1); and wondering if there is a more concise way ...
6
votes
1answer
609 views

Can I “Execute T-SQL Statement Task” against all user databases?

I'm setting up a maintenance plan on Sql Server. I want to add an Execute T-SQL Statement Task to the plan, however I do not see any way to set this task to run in every [user|system|all] database as ...
4
votes
1answer
2k views

Database Design for Questions and Answers

I'm building a website that will host a variety of questionnaires. Each questionnaire has a different number of questions and each question has a different number of answers. I have attempted to ...
4
votes
3answers
544 views

Creating new TempDB files

I would like advice on what would be the best setup for our SQL Server 2005 TempDB. At the moment our Temp DB consists of a single MDF file of 3 GB and a single log file of 120 MB on the D: drive of ...
2
votes
1answer
654 views

Safely promoting master to slave

Previously I've asked the similar question MySql Switching Masters During Failover with log-slave-updates. Let's say this is our current replication In addition, I have few application servers. ...
3
votes
1answer
3k views

How to remove xmlns from child elements with FOR XML

I have a TSQL query that I use to generate a SOAP document. I am using two namespaces. Namely: - http://schemas.xmlsoap.org/soap/envelope/ for "packaging" the soap document - A custom one that ...
1
vote
2answers
529 views

SHOW SLAVE HOSTS shows incorrect output

I had used --report-host option in one of my slaves, so that I could see that under SHOW SLAVE HOSTS. Now that server is no longer in use. I have uninstalled that server as well. Unfortunately I still ...
0
votes
1answer
1k views

database creation using codeigniter database dbforge class gives “Access denied for user 'username'@'localhost' to database 'database_name' ”

Using codeigniter database dbforge class I have created a database and loaded that database as the current database and created tables in localhost WAMP server. But when I uploaded it to the server I ...
1
vote
1answer
353 views

SQL Server Merge Replication, Agent Batch Size

Is there anyway to increase the merge agent batch size after the publication is created? I know DownloadGenerationsPerBatch flag when creating a new Publication, however what I'm looking for is a way ...
3
votes
1answer
112 views

Using Inteval Datatype to store result of calculation

I want to create a table which has hiredate and Interval of hiredate and sysdate. How to create a column that automaticlaly stores the calculation.
11
votes
1answer
7k views

How to get notices to the output stream?

I have debugging messages in functions. Those message are raised like RAISE NOTICE 'Value of id : %', id; I set my log file with \o messages.txt Then I do what I need to do with \i process.sql And ...
4
votes
1answer
812 views

How are indexes represented in an ERD?

What do indexes look like in an Entity Relationship Diagram? I've googled it and I'm unsure what the standard look of an index is in an ERD. And I'm talking about the crowsfoot diagram that includes ...
2
votes
1answer
373 views

Why my application is blocked infinitely and SQL Server never timeout and kill the deadlock

I have a multi-thread application that can opened more than one database connection to perform database operation. These connections are using the same credential. Here is a problem, the application ...
2
votes
1answer
2k views

How to schedule a weekly backup of a database only if it has been changed since last backup

I´m new to SQL Server administration. I´d like to create automatically backup database every Sunday night, but only if there was any change in previous week (if not, backup is unnecessary). Is there ...
10
votes
3answers
3k views

Database starts always in recovery mode

Everytime I restart my server, the database is always in recovery mode, and it takes about 20 minutes for it to behave as normal. This always and only happens when I restart the server, so I have a ...
8
votes
1answer
8k views

BULK INSERT permission on a single database

I work on a company that has straight IT security manners. I was hired as a Database Analyst in order to optimize some processes in our team. The problem is that I only have read and write permissions ...
5
votes
2answers
3k views

Best value for fill factor in index

I use SQL Server 2008 R2 and want to set value for fill factor property in each index. I look for recipe to calculate best value for this property (have better performance when insert record) . Also ...
3
votes
1answer
913 views

Why do we have to use SWITCH in table partitioning?

I'm a beginner in SQL. I'd like to know what is the importance of SWITCH in table partitioning? I've created one table partitioned month-wise, with a total of 12 partitions. The ranges are: ...
5
votes
2answers
787 views

SQL Server performing slow

I have a Microsoft SQL Server running on an IBM server with 10 cores and 64 GB RAM. I have from 100 to 300 users working concurrently on the server. Users complain about slowness of the application. ...
2
votes
1answer
82 views

Response On Database Failover

Let say, that I have principal server named P, and mirror server named M. I've got 7 databases that are in server P, and 7 mirror databases on server M. Whole engine works fine when we are talking ...
5
votes
2answers
1k views

Create index view with self join

I use SQL Server 2008 R2 and know that in Indexed View cant have self join. I have a tree table that have ID and ParentID Column and I need create indexed view on this table with self join between ...
2
votes
1answer
4k views

Oracle not available error with Oracle XE 11.2.0-1.0

I have downloaded Oracle XE 11.2.0-1.0 and installed it on a CentOS 6.3 virtual machine with 1.5GB memory and 3GB of swap. SYS and SYSTEM set to have password 123456. I have set ...
3
votes
2answers
3k views

SSRS Report joining data sets in BID 2008

How can we join to Data sets in SSRS? For example we have Dataset1 and Dataset2 and the common columns between them are c1 and c2. I know we can use lookup, but wondering if there is a shortcut like ...
1
vote
1answer
2k views

How to design a table for storing news items?

I have a script that can get result from news websites and it will run every hour. The php script will get the title and content. The things I want to store in MySQL are: title content ...
8
votes
5answers
67k views

Writing select result to a csv file

We need to write the SELECT query results to a csv file. How can it be done using T-SQL in SQL Server 2008 r2? I know that it can be done in SSIS, but for some reasons, we don't have this option. I ...
3
votes
1answer
576 views

Constrain input to a few different strings

Hi I can't seem to get a constraint working the way I expect in postgreSQL. From within pgadmin I execute the following SQL query. -- Check: "TypeCheck" -- ALTER TABLE "ComLog" DROP CONSTRAINT ...
9
votes
2answers
6k views

SQL Server LocalDB Instance; error restoring backup (MasterDBPath not available)

I have SQL Server 2012 Local DB Installed, and am connecting to it via (localdb)\v11.0. When trying to restore a backup file, I get: TITLE: Microsoft SQL Server Management Studio Property ...
4
votes
1answer
2k views

Oracle High-water Mark: how relevant it is when using ASSM tablespace for tables?

I have several questions: 1) If Oracle manages both High-water Mark and Low High-water Mark in ASSM tablespace then do we have to think about that when thinking about performance? I mean, does ...
4
votes
1answer
558 views

SQL Server 2008: use AVG() and an inner join

Here's what I have so far. I know this works, but I need to get the average of the pulse and depressionlevel instead of returning actual values for each row: SELECT Patients.LastName , ...
5
votes
2answers
267 views

Need for reaching data through clustered index with a non-clustered index

I have found that when a table has both clustered and non-clustered indexes (on different columns), the leaf level non-clustered pages, instead of pointing to the data row, point to the node of the ...
2
votes
1answer
134 views

Reformatting master MySQL server and temporary solution

We have MySQL master and replication servers both running on different machines. We have noticed some system files showing integrity issues in the master machine. Temporarily we would like to make the ...
0
votes
0answers
325 views

mysql high load [closed]

as you can see from the screen print below mysql is using a lot of cpu, when there isnt much going on. i have had to restore to a default my.conf so i might need some settings changing. could be wrong ...
7
votes
2answers
8k views

SQL Server Express vs. Oracle Express Edition vs DB2 Express-C

I have been trying to compare the features of the SQL Server Express, Oracle XE and DB2 Express-C, but find it difficult to compile all the differences into one place. Especially the current ...
5
votes
1answer
662 views

How large should my pool size be? And should I use pgbouncer?

I have a Rails application with 4 Unicorn workers. How do I determine what postgresql database pool size I should use? And if I have 6 applications connecting to this postgres database, would that be ...
2
votes
1answer
1k views

How can you output UPDATE / INSERT query results when using MySQL -e,--execute?

When using MySQL to run an UPDATE or INSERT, I get query result info: Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 When using MySQL from the command line (eg: mysql ...
3
votes
1answer
7k views

User can't see database in SQL Server 2008 R2

I took a backup of a SQL Server database and restored it as a new database on a different server. On this new instance I have done the following: recreated the login, associated the login with the ...
6
votes
2answers
5k views

SQL Server: Log Shipping Read Only

When log shipping between a primary database and a secondary database, does the secondary database have to be set to read-only? By read-only, I am not talking about the idea of only reading from the ...
6
votes
2answers
2k views

How to backup/restore SQL Server database from command line similar to mysql

I need to automate the migration for some databases from an older server. I know that script a tool using C# for example can be a possibility but I need a simple, fast and effective solution in order ...
2
votes
1answer
2k views

What are the most compelling reasons to upgrade from SQL Server 2005 to SQL Server 2012?

We currently have 2 SQL Server 2005 Enterprise machines in a mirrored environment running on Dell R815 servers. These machines consist of: Four AMD Opteron 6176 Processors (12 cores at 2.3Ghz), for ...
5
votes
1answer
5k views

Microsoft SQL Server 2008 R2 backup error

I'm trying to do a simple backup to an external disk and getting this error: Backup failed for Server 'Server-name' Additional information: System.Data.SqlClient.SqlError: The media loaded ...
9
votes
3answers
547 views

What should I use? A string or 15 integer fields?

I am developing a student tracking program where I need to store 15 exam marks. I can store the marks as a string and split them up when I need to, for purposes such as performing arithmetical ...
4
votes
1answer
899 views

Store SSRS Report export directly to database

As a requirement, I have to check for a certain condition on some data in the database, if the condition is true, then I have to create a pdf report and store it on a table. I have everything set up ...
2
votes
1answer
250 views

From a design perspective, what is the difference between an inventory system and an asset tracking system?

From what I can see, the database design is similar. One is the consumables that are resident in a warehouse (inventory). The others are items, capital, that are assigned to people or places, but ...
8
votes
2answers
8k views

Why is this query not using my nonclustered index, and how can I make it?

As follow up to this question about increasing query performance, I'd like to know if there is a way to make my index used by default. This query runs in about 2.5 seconds: SELECT TOP 1000 * FROM ...
3
votes
1answer
964 views

Using Service Broker internal to a single SQL Express instance?

I understand that SQL Express cannot send Service Broker messages to other instances without a Standard (or better) instance involved in the chain. But is it possible to use Service Broker to send ...
5
votes
1answer
5k views

What should I set max_connections to for MySQL?

I have MySQL 5.1.35 on Linux Centos. The Linux server has 2GB RAM with 14GB of disk space. I have created some web services using the Restlet framework in Java that has 1,000+ users. What should I ...
5
votes
1answer
164 views

how do I configure a new Oracle 11g instance to match the configuration of the old Oracle 10g server

How can I compare two Oracle database servers which are on two different machines? We need to ensure that the new server is setup correctly. For example, one machine is running Oracle 10g on ...

15 30 50 per page