[how to] How to run DB Admin Tool (GUI) in IBM DB2 Express-C? |
- How to run DB Admin Tool (GUI) in IBM DB2 Express-C?
- T- SQL : Retrieve 5th highest salary in table
- Displaying Hexadecimal Characters in Reporting Services Report
- Need help to design model with multiple rights
- weak entity with a many to many relationship with its owner
- Auto Disable a SQL Server User
- How to decode a query on a composite unary-encoded attribute?
- Do I need to use NVARCHAR rather than VARCHAR to properly store UTF8 characters in Oracle?
- sleeping SPID blocking other transactions
- Primary replica set server goes secondary after secondary fails
- Does Mongo have disappearing/phantom writes
- Oracle 10XE: Stop schemas seeing the all_users table?
- Is it okay to use rsync on InnoDB database if the MySQL server is shutdown?
- Plugin 'FEDERATED' is disabled
- Is there a difference in performance between @date and getdate()?
- Lock wait time out exceed restart transaction
- Can I recover CDC tables from transaction logs?
- How to design this database to avoid cyclic dependency?
- Selective Xml Indexing
- Normalizing a database without access to source data?
- While restoring copy of SQL Server 2008 backup file in SQL Server 2008 R2 degraded performance
- Adding User access to DB2
- Deriving formulas for input/output
- How to change data structure in mysql using mysqldump without deleting files
- Data Change Audit Plan
- Oracle: Quick way to list all database links
- Is it possible to use SQLite as a client-server database?
How to run DB Admin Tool (GUI) in IBM DB2 Express-C? Posted: 07 May 2013 09:05 PM PDT I had installed IBM DB2 Express-C in Windows but I can't find any shortcut to launch the Administration Tools (GUI). When installing, I had selected "Administration Tool" option (I had checked twice to make sure). This is the only shortcuts available from Start Menu: So how to run the Administration Tools for IBM DB2 Express-C? |
T- SQL : Retrieve 5th highest salary in table Posted: 07 May 2013 07:33 PM PDT How to get the 5th highest salary from the table. Suppose, I have 100 rows and I want to display details of 5th highest salary of the individual then how to write that query in T-SQL using SQL Server 2008R2. 1 emp1 1000 2 emp2 2000 3 emp3 3000 4 emp4 4000 5 emp5 5000 6 emp6 6000 7 emp7 7000 8 emp8 8000 9 emp9 9000 Regards. |
Displaying Hexadecimal Characters in Reporting Services Report Posted: 07 May 2013 03:13 PM PDT How do I properly display hexadecimal characters in an SSRS report? These characters: http://www.htmlhelp.com/reference/html40/entities/special.html E.g., |
Need help to design model with multiple rights Posted: 07 May 2013 05:27 PM PDT For a website, I have multiple elements that need to be moderated by many different users. Until now, I have always used Role-Based Access Control (RBAC) model but I want a more flexible model. I would like to be able to assign some user with some specific rights on particular ressources and after be able to remove/add rights as I want. For example an element would be a blog with articles. There is the author of the articles who has full rights on his article but I would like to be able to add another user for that article with update right on it. And that for all elements in my website. Here is what I have: Elements are 'page', 'article', 'anotherElement'. 'Ownership' is the table where each user has what he can do. 'Right' is the table with specific right (read, write, ...). 'Category' is not important, only to subclass my elements. Is here a better way to do this? The problem will be the size of table 'ownership' after a certain time. |
weak entity with a many to many relationship with its owner Posted: 07 May 2013 01:26 PM PDT I have a database that keeps track of the hours worked by a contractor per week. I have one table for contractors that contains "con ID" as primary key. The other table Weekly Hours Tracker contains month day year (representing a particular week) and hours worked. Now from what I understand this table is a weak entity and relies on contractor table for its existence. The relationship is defined as one contractor can work for many weeks and in one week there are many contractors working. So there is a Many to Many relationship. so is the Weekly Hours Tracker a weak entity that has a many to many relationship with its owner entity Contractors? Is following the correct way to represent the above tables? Bold attributes are keys) Contractors Table ConID Name HourlyRate Address Weekly Hours Tracker ConID Day Month Year HoursWorked |
Auto Disable a SQL Server User Posted: 07 May 2013 01:27 PM PDT I have a SQL Authentication User: JOHNDOE I would like this account to auto-expire or auto-disable after X days or at a certain date/time. Any suggestions or best practices to do this? |
How to decode a query on a composite unary-encoded attribute? Posted: 07 May 2013 01:00 PM PDT A good early paper on the topic of bitmap indexes is "Bit Transposed Files" by Wong et al, published in 1985. In all the query-decoding examples, it is left to the reader to understand how each decoded query is derived. One of the examples is too complex for me to figure out. In section 5.3.3.b, the paper shows how the BTF query processor would decode the query to find all dogs receiving more than 30 dosage units. In BTF, the query would look like this: We are told that
Thus the paper claims
and says no more about it. How does that work? By my understanding, the decoded query My attempt at understanding the solution follows. Understanding the encoded valueI quote literal values in decimal unless specified otherwise. We are told that the encoding represents the value 30. We should remember a unary field that encodes value n+1 sets all the bits that encode n plus the next rightmost bit. A 0 is encoded by setting no bits. To help me understand the derivation, I created a table that maps each bit of the attribute encoded value (u for unary) to its field value (d for decimal) and to its attribute ordinal position (n for n-th). The table looks like this: We can see from the table that the the values of the fields from left to right are (3, 2, and 5) respectively. We know that 3 * 2 * 5 = 30, so we might assume that the product of the field values gives the attribute value. If this is true, then:
Section 4 (Bit Transposition) states that attribute dosage has 200 distinct values, so all attribute values are encodable. Understanding the decoded queryThe decoded query ORs together three expressions. The first expression
The expression selects dosage values greater than 30, but selects dosages of 30 as well. If the aim is to find values strictly greater than 30, then the expression would select values that don't match the BTF query. The second expression If this is true, then the whole expression would select dogs who received a dose of 0 and many other values less than 30. By my understanding, the decoded query would select many values that don't match the BTF query. |
Do I need to use NVARCHAR rather than VARCHAR to properly store UTF8 characters in Oracle? Posted: 07 May 2013 03:45 PM PDT I want my Oracle database to properly store ALL possible UTF8 characters. If NLS_CHARSET is set to AL32UTF8 is that all I need to do? Or do I need to also make sure I use NCHAR and NVARCHAR rather than CHAR and VARCHAR to properly store UTf8 characters? |
sleeping SPID blocking other transactions Posted: 07 May 2013 01:39 PM PDT I'm really having trouble tracking down some blocking we are experiencing. The root blocking SPID's status is 'sleeping', the cmd is 'AWAITING COMMAND', and the sqltext is 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED'. When I view the Top Transactions by Blocked Transactions Count report, the Blocking SQL Statement is '--'. I've performed a trace on the SQL and when the blocking happens tracing the root blocking SPID but it hasn't really led me anywhere. The last trace statement is the same as the sqltext above 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED'. I've checked all the related SPROCs I can find to make sure they have TRY/CATCH BEGIN TRAN/COMMIT TRAN/ROLLBACK TRAN statements (we use SPROCs for everything so there are no standalone statements being ran). This issue just started happening over the last 24 hours and no one is claiming to have made any changes to the system. |
Primary replica set server goes secondary after secondary fails Posted: 07 May 2013 11:03 AM PDT I have a 2 servers replica set that, after the secondary fails the primary goes into secondary mode while the secondary is in STARTUP2 (recovering). The problem with this is that I can't use the collection stored in that replica set freely, I'm getting errors trying to use the collection: Sometimes if I restart the mongod instances, the server rs2-1 is the primary for a while, but after some time (while the secondary is recovering) I see this in the logs of rs2-1 (the primary): Is there an easy way to make the primary keep being primary after the secondary fails? Am I doing something wrong? Thanks in advance! |
Does Mongo have disappearing/phantom writes Posted: 07 May 2013 09:38 AM PDT I have heard that Mongo has something like phantom writes. For example, if I have a web request with the following db commands in a single unit of work: a) update comments in article Questions:
Where can I read some more in regards to this, or is it just a myth? |
Oracle 10XE: Stop schemas seeing the all_users table? Posted: 07 May 2013 10:24 AM PDT I've got an Oracle 10g XE Database that I want clients to be able to view remotely via SQL*PLUS or SQL Developer. Each schema has a name which includes the name of the client, so anyone looking at the all_users table would be able to see the names of all my other clients! Is there any way to restrict permissions on certain tables? And are there any other tables like this which would be a good idea to restrict access to? I'm not particularly concerned about our clients trying to hack things, I just don't want them to see a list of all our other clients! Thanks! |
Is it okay to use rsync on InnoDB database if the MySQL server is shutdown? Posted: 07 May 2013 11:22 AM PDT Is it okay to use rsync on InnoDB database if the MySQL server is shutdown ? For example : |
Plugin 'FEDERATED' is disabled Posted: 07 May 2013 12:09 PM PDT Im trying to start Mysql using easyPHP : the response is an alert window to a log file. The main error is <-- Plugin 'FEDERATED' is disabled -->. Through my research on internet i found that the solution is to add the federated option to "my.ini" file. I did this but it is still not working. Here is an extract from the log file for more information : |
Is there a difference in performance between @date and getdate()? Posted: 07 May 2013 10:17 AM PDT Usually I use the Will SQL Server 2008R2 perform faster queries if I first declare a date parameter and use that in my queries instead? |
Lock wait time out exceed restart transaction Posted: 07 May 2013 10:57 AM PDT I had got error on the lock wait time out so below I got 3 samples taken. One I took before the increase innodb_lock_wait_timeout to 120. So is there anything else I must tweak based on the logs below. Before increasing 1st sample after increase 2nd sample after increase select version(); show global variables like 'innodb%'; |
Can I recover CDC tables from transaction logs? Posted: 07 May 2013 06:02 PM PDT Is there anyway to restore CDC tables from transaction logs? My basic understanding is that CDC reads these logs, and entries that are specially marked, are grabbed by CDC. Once this has happened though, this data is no longer flagged for harvesting by CDC. I need this to happen because a DB was restored without any KEEP_CDC options. MS SMS, 2008 R2, sql server 10.5.16 |
How to design this database to avoid cyclic dependency? Posted: 07 May 2013 12:46 PM PDT There are two tables:
User contains a reference to Address. Address contains the columns CreatedBy and ModifiedBy, which is reference to User. How do I design this database to avoid a cyclic dependency? |
Posted: 07 May 2013 10:00 AM PDT I have recently been researching Selective Xml Indexing and have been trying to figure out how to index a If I have the below query I can write a selective Index as below if I am following it right: Can I include the c.query in the index? Thanks |
Normalizing a database without access to source data? Posted: 07 May 2013 09:31 AM PDT I've started a new role which deals with large amount of related data. Our source of all this data is various Excel dumps pulled from databases we do not have access to. The previous person filling this role used a dozen or so Excel files to gather these data files, manipulate them, and create reports. I have started moving the dumps to an Access database. I have noticed a lot of the Excel data is related and should probably be normalized. What I have currently been doing is creating a table for every data dump, and importing them to Access, and using a number of queries to replicate the dozens of data manipulations and reporting. Are there still benefits to normalizing data where my only source are Excel dumps out of a warehouse? How would I normalize data, when I do not have the ability to change the format of how the dumps are sent to me? Additionally, my plan (budget-depending) is to move from Access to a MS SQL Database. |
While restoring copy of SQL Server 2008 backup file in SQL Server 2008 R2 degraded performance Posted: 07 May 2013 04:05 PM PDT I am trying to upgrade our SQL Server version from SQL Server 2008 to SQL Server 2008 R2. But when I restored a SQL Server 2008 backup file in SQL Server 2008 R2, it's significantly degraded the performance of stored procedures. I took a full back up from old SQL Server 2008 and restored it in new SQL Server 2008 R2. I checked the execution plan of several stored procedures to make sure no indexes are missing, but everything is same. Can anyone please give me an advice about it if I need to do any further steps to get better performance on it? Thanks, Dony |
Posted: 07 May 2013 10:59 AM PDT I have installed DB2 10.1 in a Red hat box. During the installation I was asked to create several users (db2inst1, db2fenc1 etc). I have been using db2inst1 to perform all operations with DB2 and it works perfectly fine. The sqllib files are located in
The installation files are located in
All users have access to both these folders. I now want to perform the DB2 operations with another user, namely "john". Given that db2 uses the underlying user/password of the host machine, I added the groups dasadm1 and ds2iadm1 to the "john" user (which are the ones listed in db2inst1).
I can properly enter the db2 cmd with the user "john"
but when I run my java app as user "john" I get the following error:
this error does not appear if I run the same java app as user db2inst1. The library paths are the exactly the same for both users. Any idea what is going wrong? |
Deriving formulas for input/output Posted: 07 May 2013 08:05 PM PDT I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula.
I've been using some software that was given with the assignment and it also asks what are the maximum number of blocks that are allowed and that is not given by the above brief. I'm not really sure how to derive a formula for this. I've assumed that because there are 3 records per block there are 4 blocks required and that a random heap file uses 1 disk i/o per write/read. If this is a larger topic than is worth explaining a link to a reliable few pages is also helpful. |
How to change data structure in mysql using mysqldump without deleting files Posted: 07 May 2013 02:15 PM PDT Essentially what I'm trying to do is sync a production server with a sandbox server, but only the table structures and stored procedures. The procedures aren't any problem since they can be overriden, but the problem is the tables. I want to sync and alter their structures on the production server using If it helps, I only want to add more columns, not remove any existing ones. Also, I am using Is there any way to do this? |
Posted: 07 May 2013 12:24 PM PDT My company is changing from a distributed Access Database model to using a centralized SQL Database. The datatables were designed such that all of the tables have a modified date. In discussion it was suggested that since we will be creating a trigger on each table to handle the modified date perhaps we should have the trigger also log some information to an audit table. Is this the best way to setup auditing so that we can track who is changing information or is there a better way? Links to articles on the subject are welcome. For the audit I'm looking at capturing the table name, column name, date modified, row id and the username of the person making the change. Is there any information I'm not thinking of that I should be capturing that might help me avoid future pit falls? |
Oracle: Quick way to list all database links Posted: 07 May 2013 03:29 PM PDT The title says it all, is there a way to quickly list all the current database links in oracle? Something along the same lines as this, which lists the current user's tables:
Thanks, GC. |
Is it possible to use SQLite as a client-server database? Posted: 07 May 2013 10:48 AM PDT Are there any techniques or tools to work with SQLite on a medium size/traffic/concurrency DB environment? |
You are subscribed to email updates from Recent Questions - Database Administrators Stack Exchange To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment