How to configure the database instance to respond slowly for any request?
You can try starving the system of memory. Set the database server to only have access to a few megs of memory. This should make the system very unresponsive.

View Answer   |  December 17, 2008  8:40 AM
Database configuration, Database instance, Database testing, DB2, Oracle, SQL Database, SQL Query, SQL Server
answered by:
64,550 pts.

SQL Server – where clause
First you should get used to using the new syntax for writing joins as eventually the old syntax (which you used) will no longer be supported. <pre>SELECT * FROM a INNER JOIN b ON a.xx = b.xx</pre> As for why this is slow you probably don’t have the correct indexes on table b. Also if [...]

View Answer   |  December 17, 2008  8:35 AM
SQL Server, SQL Server performance, WHERE clause
answered by:
64,550 pts.

Executing DTSX from VB.NET 2003
Please refer to this article below http://www.codeproject.com/kb/aspnet/ssis_dotnet.aspx

View Answer   |  December 16, 2008  10:37 AM
DTS, DTS packages, DTSX, Excel import/export, Microsoft Excel, SQL Server 2000, SQL Server 2005, SQL Server upgrades, VB.NET 2003
answered by:
45 pts.

Linked servers from SQL 2000 to SQL EXPRESS 2005
You can create this linked server just as you would any other linked server. For the server name simply specify SERVERNAMEINSTANCENAME. As the SQL 2005 instance is on the same server you can setup the connection to map the domain users to them selves. If you need SQL Accounts to have access to the SQL [...]

View Answer   |  December 15, 2008  6:23 PM
Linked servers, SQL Server 2000, SQL Server 2005, SQL Server Express
answered by:
15 pts.

How to use SQL triggers to log errors in a SQL table?
You wouldn’t use triggers to log errors into the SQL Server. You would need to put code into the stored procedures that make up your application to log any errors which are encountered.

View Answer   |  December 13, 2008  12:34 AM
SQL Server, SQL Server error logs, SQL Server triggers
answered by:
64,550 pts.

answered by:
64,550 pts.

System tables in SQL Server 2005
In SQL Server 2005 there are no longer any system tables. There are now system catalog views which look into the system catalog to get the information. These catalog views are used to view the metadata about the objects in the database. These views are read only and not be modified. You need to modify [...]

View Answer   |  December 13, 2008  12:23 AM
SQL Server 2005, SQL Server System Tables, SQL Server tables, SYSTEM TABLESPACE
answered by:
64,550 pts.

Impact on application after upgrade from SQL Server 2005 to SQL Server 2008?
<a href=”http://www.sqlservercentral.com/articles/Compression/62746/”>Here is a good resource,</a> but you will have to sign up for a free account first. Here is another <a href=”http://technet.microsoft.com/en-us/magazine/cc434690.aspx”>good article</a> on Technet.

View Answer   |  December 12, 2008  2:50 PM
SQL Server 2005, SQL Server 2005 upgrade, SQL Server 2008, SQL Server 2008 performance, SQL Server migration, SQL Server performance, SQL Server upgrades
answered by:
56,975 pts.

How to save the output from an SQL select statement to a spool file
Hi, If you’re running your SQL statement from STRSQL – Press F13 (Services), select option 1 (Change session attributes), Change the “SELECT Output” parameter to option 2 = Printer. Regards, Martin Gilbert.

View Answer   |  December 12, 2008  10:53 AM
SELECT statement, Spool files, Spool to Flat, SQL, SQL statements, Start Structured Query Language, STRSQL
answered by:
23,625 pts.

Sql Server Agent
Have you tried the following already ? <li>Check the Login account for the service and if it using a user account make sure you have the right password stored in there. </li><li>Check the Application/System logs. What error messages do you see there ?</li><li>Has anything changed recently on your server ? Upgrades etc ?</li><li>What version/edition of [...]

View Answer   |  December 11, 2008  4:32 PM
SQL Server Agent
answered by:
15 pts.

Transferring SQL 7 DB to SQL 2005 DB
You can take your SQL 7 databases and detach them from the SQL 7 instance, then move them to the SQL 2005 server, and attach them to the SQL 2005 Instance. This <a href=”http://support.microsoft.com/kb/246133/”>MS KB</a> will show you how to migrate your logins from one SQL Server to another. The process it self is fairly [...]

View Answer   |  December 11, 2008  4:10 PM
Dell PowerEdge, SQL Server 2005, SQL Server 7.x, SQL Server import/export, SQL Server migration
answered by:
15 pts.

Error message from SQL Server 2000 Agent after antivirus installation
Check the status of the service from Administrative Tools - is the service Running or Starting? Alerts and operators can be edited without Agent running. Also check your Agent.out file. See if you see: “… ? [393] Waiting for SQL Server to recover databases…” If you tried stopping and then restarting just the Agent service [...]

View Answer   |  December 11, 2008  3:32 PM
SQL Server 2000, SQL Server Agent, SQL Server errors
answered by:
35 pts.

insert into with select and passing variables
Fire up SQL Profiler and see what the actual command is that is being run against the SQL Server.

View Answer   |  December 11, 2008  4:06 AM
PHP, SQL Server 2005, SQL Server errors, SQL Server Variables
answered by:
64,550 pts.

Uninstalling a SQL Server service pack
What version of SQL Server are you looking at? Most SQL service packs can not be uninstalled. You need to uninstall the SQL Server, and reinstall it, then apply the older service pack.

View Answer   |  December 11, 2008  3:57 AM
Service packs, SQL Server, SQL Server Service Packs, SQL Server upgrades
answered by:
64,550 pts.

Writing a hidden trigger against a SQL table
Who are you trying to hide the trigger from? Assuming that you are trying to hide the trigger from the DBA you can’t. Users who are members of the sysadmin fixed server role can see all the objects on the server. People who aren’t sysadmin or dbo of the database can not see objects which [...]

View Answer   |  December 11, 2008  3:56 AM
SQL Server tables, Triggers
answered by:
64,550 pts.

Scope identity on a stored procedure in SQL
You will want to use the sp_executesql stored procedure to do this. Something like this. <pre>CREATE procedure [dbo].[sp_trip_number] @Table_Name nvarchar(100), @Trip_Number int output as begin set nocount on begin transaction DECLARE @DynamicSQL NVARCHAR(1000) DECLARE @New_Trip_Number int SET @DynamicSQL=’INSERT INTO ‘ + @Table_Name + ‘ DEFAULT VALUES; SELECT @New_Trip_Number = SCOPE_IDENTITY()’ exec sp_executesql @DynamicSQL, ‘@New_Trip_Number INT’, [...]

View Answer   |  December 11, 2008  3:54 AM
Parameters, scope, SQL Server stored procedures
answered by:
64,550 pts.

Finding which columns contain data in a table
The following query will give you that information for a specific table: <pre> select column_name,data_type,data_length,data_precision,nullable,column_id from all_tab_columns atc, all_tables at where atc.table_name = at.table_name and atc.owner = at.owner and at.owner = ‘&owner’ and at.table_name = ‘&table’ and atc.num_nulls < at.num_rows order by atc.column_id;</pre> (I tested it on Oracle 8i, thereby I could not use the [...]

View Answer   |  December 10, 2008  11:34 PM
columns, Data migration, Database migration, Oracle Database, Oracle Database to SQL Database Migration, SQL Database
answered by:
63,580 pts.

Consolidating SQL Server databases
Upgrade SQL Server with the Copy Database Wizard This topic describes how to use the Copy Database Wizard to upgrade a SQL Server database to a later version. When using the Copy Database Wizard to upgrade a database, adhere to the following requirements: * Before upgrading, make sure that no applications or services are trying [...]

View Answer   |  December 10, 2008  2:47 PM
SQL Server 2000, SQL Server 2005, SQL Server Database Consolidation, SQL Server databases
answered by:
9,815 pts.

Estimated cost for upgrade from SQL Server 2005 SE to SQL Server 2005 EE
SQL Server 2005 doesn’t have an upgrade license available so you have to purchase a new SQL Server 2005 Enterprise license. If you are using CPU licensing the licenses retail for $25,000 US per CPU. If you are using CAL based licenses then the server license cost retails for $13,819 US. If you are using [...]

View Answer   |  December 10, 2008  11:56 AM
SQL Server 2005, SQL Server upgrades
answered by:
64,550 pts.

SQL Server 2000 script
The question is a bit vague. I am assuming the question is: - we have item records with one or more prices that change over time - any given item record may have one or more prices - if an item has two or more price records, how can I get the next to the [...]

View Answer   |  December 10, 2008  4:19 AM
Conditional SQL statements, SQL, SQL Query, SQL Server 2000, SQL Server 2000 Scripts, SQL Server Scripts
answered by:
3,830 pts.