Changing over to DR database from SQL 2005
You have to restore the tail last of the log files that you have available, then bring the database online via: <pre>RESTORE LOG YourDatabase WITH RECOVERY</pre> This will bring the database back online. To then move back to production, you have to setup log shipping in the other direction, then switch everyone over.

View Answer   |  June 28, 2010  7:36 PM
Disaster Recovery Database, HP DL380, Restore Database, SQL 2005 Database, SQL Log Files
asked by:
64,550 pts.

SQL Server 2008 Code to find fields containing similar text
You could probably use full text indexing to make this work. Otherwise you’ll need to specify every column that you want to match to. No matter what technique you use, this won’t be a very efficient query to run.

View Answer   |  June 28, 2010  7:31 PM
SQL commands, SQL Fields, SQL Server 2008 administration, SQL Server development
asked by:
64,550 pts.

Log In then Output the Data of the Logged Person C# SQL 2005
You would have to query your table to get the corresponding name. In general you will need a database connection object, a command object and a reader object. If this is not the answer you were looking for, or you need a more detailed answer, please provide more details about your requirement/problem and let us [...]

View Answer   |  June 24, 2010  5:18 PM
C#, Programming, SQL 2005, sql 2005 Performance Issues, SQL Database
asked by:
63,580 pts.

How to split a column into SQL data..
This problem is why relational data is best reduced to a more atomic level. A better design would be something like: <pre> Table: LOCATION columns STAT_PROV COUNTRY CONTINENT </pre> When you need them combined, you can do so in your SQL. Like this: SELECT STAT_PROV || ‘–’ || COUNTRY || ‘(‘ || CONTINENT || ‘)’ [...]

View Answer   |  June 24, 2010  12:40 AM
SQL Server 2005, SQL Server tables, T-SQL
asked by:
63,580 pts.

Find the SQL value behind the decimal
In other words, you want to know if the number is an integer, right ? The syntax could be different depending on the database being used. Oracle: <pre>SELECT DECODE(yourColumn,FLOOR(yourColumn),’INTEGER’,'NON-INTEGER’) FROM yourTable;</pre> SQL Server: <pre>SELECT CASE WHEN yourColumn = FLOOR(yourColumn) THEN ‘INTEGER’ ELSE ‘NON-INTEGER’ END FROM yourTable</pre> ————–

View Answer   |  June 23, 2010  10:10 PM
SQL, SQL Query, SQL Syntax
asked by:
63,580 pts.

Users accessing SQL Server 2008 database
You’ll want to use Activity Monitor (within SQL) to view the current performance of your database. Use Activity Monitor to obtain information about SQL Server processes and how these processes affect the current instance of SQL Server. The Activity Monitor page has the following sections: Overview – Shows graphical displays of the percent of processor [...]

View Answer   |  June 22, 2010  7:53 PM
SQL Server, SQL Server 2008, SQL Server User Accounts
asked by:
8,120 pts.

Can anyone tell me the best way to query Active Directory in SQL?
Here are instructions step by step to query AD from SQL: http://www.gchandra.com/scripts/?p=79

View Answer   |  June 22, 2010  7:37 PM
Active Directory, Active Directory query, LDAP, SQL Server 2005, SQL Server Management Studio 2005, T/SQL
asked by:
8,120 pts.

Converting from RPGLE to DB2/400 SQL
The starting place should the Information Center topic on <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/sqlp/rbafyroutines.htm”>Database Routines</a>. The Related Information topic under Database lists numerous other resources. One listed resource that you might find particularly useful is the <a href=”http://www.redbooks.ibm.com/abstracts/sg246503.html?Open”>Stored Procedures, Triggers, and User-Defined Functions on DB2 Universal Database for iSeries</a> Redbook. And, of course, the actual SQL Reference manuals [...]

View Answer   |  June 22, 2010  12:56 AM
DB2/400, RPGLE, SQL, SQL migration
asked by:
110,115 pts.

SQL Server 2005: Improving performance of Multiple Databases & LUNS
It depends. If one database needs more IO than the other then no, you’ll just make things worse by giving that database less disks. Usually you want to give the databases the most disks possible. Is your IO mostly reads or writes? If it’s writes then stick with RAID 10, however if it is mostly [...]

View Answer   |  June 19, 2010  10:46 PM
Cluster management, LUN, RAID 10, SQL Server 2005, SQL Server clustering, SQL Server performance, Storage in 2010
asked by:
64,550 pts.

Bulk Insert Problem in SQL Server Management Studio 2005
Does the G: drive exist on the SQL Server? Is it a mapped drive? If it is you a UNC network path instead of a mapped drive.

View Answer   |  June 18, 2010  8:52 PM
SQL INSERT, SQL Server Management Studio 2005, T/SQL
asked by:
64,550 pts.

SQL Query for Price Data of Different Stocks from 1 table with same dates
I’m not sure I understand correctly, but you could try something similar to this: <pre>SELECT s1.date,s1.stock,s2.stock,s1.price,s2.price FROM your_table s1 JOIN your_table s2 ON s1.date = s2.date AND s1.stock != s2.stock WHERE s1.stock = <something> AND s2.stock = <something> AND s1.date BETWEEN <something> AND <something>;</pre>

View Answer   |  June 17, 2010  5:10 PM
SQL Express, SQL Express 2005, SQL Query, SQL Server
asked by:
63,580 pts.

SQL 2000 migration to SQL 2005 – need to preserve user security
Google for sp_help_revlogin which will allow you to script out the logins with the SIDs so that when you create the logins on the new server the SIDs will match. You should also look at <a href=”http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-how-do-i-use-sp_change_users_login/”>sp_change_users_login</a> which will reassign logins to users after moving the database to another server.

View Answer   |  June 17, 2010  2:01 AM
SQL Database Security, SQL Server 2000 to SQL Server 2005 upgrade, SQL Server security, SQL Server Upgrade
asked by:
64,550 pts.

SQL Server 2008 Management Studio evaluation edition a time bomb?
There is no license needed to run the management tools. You can install the management tools from the SQL CD/DVD on an many computers in your company as you would like.

View Answer   |  June 16, 2010  1:00 AM
Management Studio, SQL Server 2008, SQL Server licensing, SQL Server Query
asked by:
64,550 pts.

Backup storage for sql server 2005
There’s a lot of meta data within the database which is created when the database is created. All of this is logged within the transaction log.

View Answer   |  June 16, 2010  12:46 AM
Backup storage, SQL Server 2005, Storage in 2010
asked by:
64,550 pts.

Binary Math windows server 2008 sql server 2008 r2
So you are using a bitwise operator to figure out what permissions a user has? What data type are you using? BIGINT supports a value up to 9,223,372,036,854,775,807. You might want to find a better way to store permissions.

View Answer   |  June 16, 2010  12:31 AM
Binary Math, SQL Server 2008 R2, User Permissions, Windows Server 2008
asked by:
64,550 pts.

SQL Server table structure
Yes. If you are using SQL 2000 or older then query the INFORMATION_SCHEMA.tables and INFORMATION_SCHEMA.columns system views. If you are using SQL 2005 or newer then query the sys.tables and sys.columns catalog views.

View Answer   |  June 16, 2010  12:25 AM
SQL commands, SQL Server, SQL Server tables
asked by:
64,550 pts.

Using Report Server in SharePoint 2010
This cannot be done directly thru the SharePoint Object Model; you would need to use Report Server APIs/Web Methods. <i>This question was answered by Spencer Harbar, Enterprise Architect at Microsoft and Dan Holme, Consultant and Trainer, Intellium.</i>

View Answer   |  June 15, 2010  8:16 PM
Report Server, ReportService 2006, Sharepoint 2010, SSRS 2008
asked by:
975 pts.

Compare Two Tables With Identical Fields
Something like this should do the trick: <pre> —* FIND THE ROWS IN TABLE TTESTA THAT HAVE NO MATCH IN TTESTB —* SELECT COL1, COL2 FROM TTESTA TA WHERE NOT EXISTS (SELECT 1 FROM TTESTB TB WHERE TA.COL1 = TB.COL1 AND TA.COL2 = TB.COL2) ; </pre> An outer join could also be used. If you [...]

View Answer   |  June 15, 2010  2:12 PM
SQL, SQL tables
asked by:
5,205 pts.

SQL Recovery from MDF and LDF – Missing Data
Sounds very odd that the data from the recovery firm matches the date of your last backup. Your transaction log and database files should have been modified since then. Try running a restore. Your database may be in the state of your last backup, and the transaction logs should have all the transactions since your [...]

View Answer   |  June 15, 2010  3:27 AM
LDF, MDF, SQL 2000, SQL Server 2000, SQL Server backup, SQL Server backup and restore
asked by:
27,325 pts.

Inserting DB2 records on iSeries to SQL Server 2005 Table
Practically speaking, you almost certainly won’t use CL nor RPG to do this. You’ll use Java and JDBC. You would use ILE RPG to invoke the Java methods, though, and possibly use CL to call the RPG. Microsoft’s implementation of ODBC was originally kind of a proprietary superset of a subset of the open DRDA [...]

View Answer   |  June 14, 2010  9:26 PM
DB2, iSeries, SQL Server 2005
asked by:
110,115 pts.