Save info   Get password
Home Submit your blog Edit Account Rules RSS-Archive Contact


What is De-normalization?
2008-04-18 06:08:34
De-normalization is the process of attempting to optimize the performance of a database by addingredundant data. It is sometimes necessary because current DBMSs implement the relational modelpoorly. A true relational DBMS would allow for a fully normalized database at the logical level, whileproviding physical storage of data that is tuned for high performance. De-normalization is a techniqueto move from higher to lower normal forms of database modeling in order to speed up database access.


How to get @@error and @@rowcount at the same time?
2008-04-18 06:07:56
If @@Rowcount is checked after Error checking statement then it will have 0 as the value of@@Recordcount as it would have been reset.And if @@Recordcount is checked before the error -checking statement then @@Error would get reset.To get @@error and @@rowcount at the same time do both in same statement and store them in localvariable. SELECT @RC = @@ROWCOUNT, @ER = @@ERROR


What is Identity?
2008-04-18 06:07:39
Identity (or AutoNumber) is a column that automatically generates numeric values. A start andincrement value can be set, but most DBA leave these at 1. A GUID column also generates numbers,the value of this cannot be controled. Identity/GUID columns do not need to be indexed.


What is a Scheduled Jobs or What is a Scheduled Tasks?
2008-04-18 06:07:26
Scheduled tasks let user automate processes that run on regular or predictable cycles. User canschedule administrative tasks, such as cube processing, to run during times of slow business activity.User can also determine the order in which tasks run by creating job steps within a SQL Server Agentjob. E.g. Back up database, Update Stats of Tables. Job steps give user control over flow of execution.If one job fails, user can configure SQL Server Agent to continue to run the remaining tasks or to stopexecution.
Read more: Tasks

What is a table called, if it does not have neither Cluster nor Non-cluster Index? What is it
2008-04-18 06:07:09
What is a table called, if it does not have neither Cluster nor Non-cluster Index ? What is itused for?Ans:Unindexed table or Heap. Microsoft Press Books and Book On Line (BOL) refers it as Heap.A heap is a table that does not have a clustered index and, therefore, the pages are not linked bypointers. The IAM pages are the only structures that link the pages in a table together.Unindexed tables are good for fast storing of data. Many times it is better to drop all indexes from tableand than do bulk of inserts and to restore those indexes after that.


What is BCP? When does it used?
2008-04-18 06:06:41
BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy thestructures same as source to destination.


How do you load large data to the SQL server database?
2008-04-18 06:06:25
BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps toImports a data file into a database table or view in a user-specified format.
Read more: large , SQL , server

Can we rewrite subqueries into simple select statements or with joins?
2008-04-18 06:06:08
Subqueries can often be re-written to use a standard outer join, resulting in faster performance. As wemay know, an outer join uses the plus sign (+) operator to tell the database to return all non-matchingrows with NULL values. Hence we combine the outer join with a NULL test in the WHERE clause toreproduce the result set without using a sub-query


Can SQL Servers linked to other servers like Oracle?
2008-04-18 06:05:54
SQL Server can be lined to any server provided it has OLE-DB provider from Microsoft to allow a link.E.g. Oracle has a OLE-DB provider for oracle that Microsoft provides to add it as linked server to SQLServer group.
Read more: SQL , servers

How to know which index a table is using?
2008-04-18 06:05:38
SELECT table_name,index_name FROM user_constraints


How to copy the tables, schema and views from one SQL server to another?
2008-04-18 06:05:22
Microsoft SQL Server 2000 Data Transformation Services (DTS) is a set of graphical tools andprogrammable objects that lets user extract, transform, and consolidate data from disparate sourcesinto single or multiple destinations.
Read more: server , views

What is Self Join?
2008-04-18 06:05:01
This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A selfjoin can be of any type, as long as the joined tables are the same. A self join is rather unique in that itinvolves a relationship with only one table. The common example is when company have a hierarchalreporting structure whereby one member of staff reports to another.


What is Cross Join?
2008-04-18 06:04:46
A cross join that does not have a WHERE clause produces the Cartesian product of the tables involvedin the join. The size of a Cartesian product result set is the number of rows in the first table multipliedby the number of rows in the second table. The common example is when company wants to combineeach product with a pricing table to analyze each product at each price.
Read more: Cross

Which virtual table does a trigger use?
2008-04-18 06:04:28
Inserted and Deleted.
Read more: virtual , trigger

List few advantages of Stored Procedure.
2008-04-18 06:04:09
· Stored procedure can reduced network traffic and latency, boosting application performance.· Stored procedure execution plans can be reused, staying cached in SQL Server's memory,reducing server overhead.· Stored procedures help promote code reuse.· Stored procedures can encapsulate logic. You can change stored procedure code withoutaffecting clients.· Stored procedures provide better security to your data.
Read more: Procedure

What is DataWarehousing?
2008-04-18 06:03:49
· Subject-oriented, meaning that the data in the database is organized so that all the dataelements relating to the same real-world event or object are linked together;· Time-variant, meaning that the changes to the data in the database are tracked and recordedso that reports can be produced showing changes over time;· Non-volatile, meaning that data in the database is never over-written or deleted, oncecommitted, the data is static, read-only, but retained for future reporting;· Integrated, meaning that the database contains data from most or all of an organization'soperational applications, and that this data is made consistent.


What is OLTP(OnLine Transaction Processing)?
2008-04-18 06:03:28
In OLTP - online transaction processing systems relational database design use the discipline of datamodeling and generally follow the Codd rules of data normalization in order to ensure absolute dataintegrity. Using these rules complex information is broken down into its most simple structures (a table)where all of the individual atomic level elements relate to each other and satisfy the normalizationrules.
Read more: Transaction , Processing

How do SQL server 2000 and XML linked? Can XML be used to access data?
2008-04-18 06:02:49
How do SQL server 2000 and XML linked ? Can XML be used to access data?FOR XML (ROW, AUTO, EXPLICIT)Ans:You can execute SQL queries against existing relational databases to return results as XML rather thanstandard rowsets. These queries can be executed directly or from within stored procedures. To retrieveXML results, use the FOR XML clause of the SELECT statement and specify an XML mode of RAW, AUTO,or EXPLICIT.


OPENXML
2008-04-18 06:01:50
OPENXML is a Transact-SQL keyword that provides a relational/rowset view over an in-memory XMLdocument. OPENXML is a rowset provider similar to a table or a view. OPENXML provides a way toaccess XML data within the Transact-SQL context by transferring data from an XML document into therelational tables. Thus, OPENXML allows you to manage an XML document and its interaction with therelational environment.


What is an execution plan? When would you use it? How would you view the execution plan?
2008-04-18 06:01:33
An execution plan is basically a road map that graphically or textually shows the data retrieval methodschosen by the SQL Server query optimizer for a stored procedure or ad-hoc query and is a very usefultool for a developer to understand the performance characteristics of a query or stored procedure sincethe plan is the one that SQL Server will place in its cache and use to execute the stored procedure orquery. From within Query Analyzer is an option called "Show Execution Plan" (located on the Querydrop-down menu). If this option is turned on it will display query execution plan in separate windowwhen query is ran again.


Global Temporary Tables
2008-04-07 10:43:51
I listened intently to the new Oracle programmer as he described all the struggles he's been having on his first big project. As I've done many times already in his short career, I interrupt with some words of wisdom."It's time to add Global Temporary Tables to your toolbelt.""What are those?" he asks, as he opens the directory with the Oracle documentation. I smile. He has already learned where I always send him first."They're the ultimate work tables," I continue. "They're permanent tables, where you can add and modify session-specific data without affecting other sessions.""What's so special about that?" he asks. "Even with regular tables, you can add and modify the data all you want without affecting other sessions. Just don't commit, and remember to rollback when your session is don


Which command using Query Analyzer will give you the version of SQL server and operating
2008-05-10 04:27:05
Which command using Query Analyzer will give you the version of SQL server and operatingsystem?Ans:SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY('edition')


What is SQL server agent?
2008-05-10 04:26:48
SQL Server agent plays an important role in the day-to-day tasks of a database administrator (DBA). Itis often overlooked as one of the main tools for SQL Server management. Its purpose is to ease theimplementation of tasks for the DBA, with its full-function scheduling engine, which allows you toschedule your own jobs and scripts.
Read more: SQL , server

Can a stored procedure call itself or recursive stored procedure? How many level SP nesting
2008-05-10 04:26:32
Can a stored procedure call itself or recursive stored procedure? How many level SP nestingpossible?Ans:Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves.Recursion can be defined as a method of problem solving wherein the solution is arrived at byrepetitively applying it to subsets of the problem. A common application of recursive logic is to performnumeric computations that lend themselves to repetitive evaluation by the same processing steps.Stored procedures are nested when one stored procedure calls another or executes managed code byreferencing a CLR routine, type, or aggregate. You can nest stored procedures and managed codereferences up to 32 levels.


What is @@ERROR?
2008-05-10 04:26:08
The @@ERROR automatic variable returns the error code of the last Transact-SQL statement. If therewas no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement,it must be saved to a variable if it is needed to process it further after checking it.


What is Raiseerror?
2008-05-10 04:25:47
Stored procedures report errors to client applications via the RAISERROR command. RAISERRORdoesn't change the flow of a procedure; it merely displays an error message, sets the @@ERRORautomatic variable, and optionally writes the message to the SQL Server error log and the NTapplication event log.


What is log shipping?
2008-05-10 04:25:29
Log shipping is the process of automating the backup of database and transaction log files on aproduction SQL server, and then restoring them onto a standby server. Enterprise Editions onlysupports log shipping. In log shipping the transactional log file from one server is automatically updatedinto the backup database on the other server. If one server fails, the other server will have the same dbcan be used this as the Disaster Recovery plan. The key feature of log shipping is that is willautomatically backup transaction logs throughout the day and automatically restore them on thestandby server at defined interval.


What is the difference between a local and a global variable?
2008-05-10 04:25:10
A local temporary table exists only for the duration of a connection or, if defined inside a compoundstatement, for the duration of the compound statement.A global temporary table remains in the database permanently, but the rows exist only within a givenconnection. When connection are closed, the data in the global temporary table disappears. However,the table definition remains with the database for access when database is opened next time.
Read more: difference

What command do we use to rename a db?
2008-05-10 04:24:50
sp_renamedb ‘oldname’ , ‘newname’If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user usingsp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi usermode.
Read more: command

What is sp_configure commands and set commands?
2008-05-10 04:24:32
Use sp_configure to display or change server-level settings. To change database-level settings, useALTER DATABASE. To change settings that affect only the current user session, use the SET statement.


Page 1 of 2 « < 1 2 > »
eXTReMe Tracker