Accessing a mirror database without main database failover
You can’t. Database mirroring doesn’t allow you to view the database which is acting as the mirror. Your only option would be to create a snapshot of the mirrored database and use that to look at the data. However this snapshot will not be update to date as the snapshot is a snap as the [...]

View Answer   |  November 25, 2008  5:15 AM
Database Failover, Database mirroring, Failover, Mirroring, SQL Server database
answered by:
64,520 pts.

Error message while implementing mirroring between two databases on separate servers
What state in the database on the remote side in? It should be in the restoring state after you are restored the backup from the primary server. If it isn’t take another full backup and restore it with the NORECOVERY flag so that it stays in the restoring state.

View Answer   |  November 25, 2008  5:11 AM
Database mirroring, SQL Server databases, SQL Server errors
answered by:
64,520 pts.

Best database replication strategy for a consolidated SQL Server
That depends on your goals. If you want to setup two servers which can both be written to then merge replication will do the trick. If you want to setup a backup server that you can fail over to then replication isn’t going to be the right solution; database mirroring is. Can you provide more [...]

View Answer   |  November 25, 2008  5:10 AM
Database replication, SQL Server, SQL Server Consolidation
answered by:
64,520 pts.

Triggering a stored procedure from C#
Assuming you mean that you want to call a stored procedure from c# (and that the stored procedure is written in T-SQL): One way is to do as follows: <pre> string _connString = //your <a href=”http://www.connectionstrings.com/”>connection string</a> string _storedProcedure = //your stored procedure’s name, ex. sp_MyProcedure object parameterValue, parameterValue2 = //these need to be of [...]

View Answer   |  November 23, 2008  6:46 PM
C#, Stored Procedures, Triggers
answered by:
70 pts.

Backing up and copying a database across SQL Servers
Here is a <a href=”http://technet.microsoft.com/en-us/library/ms187048(SQL.90).aspx”>helpful guide</a> for you.

View Answer   |  November 21, 2008  8:13 PM
SQL Server 2005, SQL Server backup and restore, SQL Server databases
answered by:
56,975 pts.

Adding columns and updating a SQL table in a reporting database-
Are you getting errors ? what are they ? I think it would be more easy to try to help if you share the actual code that implements that logic, and provide as much information as possible about the problem. ———————————

View Answer   |  November 21, 2008  8:09 PM
SQL Server database, SQL Server tables, SQL tables
answered by:
63,535 pts.

Configuring a password message prompt on SQL Server 2000
This can not be done. The only time that you can provide a password is when you connect to the SQL Server.

View Answer   |  November 21, 2008  7:04 PM
Enterprise Manager, SQL Server 2000, SQL Server permissions
answered by:
64,520 pts.

Error message while restoring the a SQL database onto a mirror database
When you restore the database in the NORECOVERY mode it will stay in the Recovering state. That is expected. You can not access the database which is the mirror of a mirroring solution. You can only access the principle database of the solution.

View Answer   |  November 21, 2008  7:02 PM
SQL Server database, SQL Server restore
answered by:
64,520 pts.

Limit SQL Admin Access to a single DB
Here is an excellent article on <a href=”http://www.databasejournal.com/features/mssql/article.php/3481751/SQL-Server-2005-Security—Part-2-Authorization.htm”>security for SQL 2005.</a> To give a user “admin” rights to a database put them in the db_owner database role. If you are talking about restricting a sysadmin no only be the sysadmin of one database; this can not be done.

View Answer   |  November 21, 2008  6:59 PM
SQL 2005 admin, SQL Security
answered by:
64,520 pts.

How To Schedule SQL Query To Run In Microsoft SQL Server
Basically you have two ways to do this: The first one is scheduling an operative system task (start-accessories-system tools-scheduled tasks) where you call the “SQLCMD” shell command to perform a query the second one is programming a new job on SQL server management studio (SQL server agent – jobs new) with a transact-sql step with [...]

View Answer   |  April 18, 2013  6:57 PM
Automated SQL Query, Scheduled Tasks, SQL Query
answered by:
63,535 pts.

Reducing CPU usage on a SQL Server application
Some things you can start by looking at are: Buffer cache hit ratio. Disk performance Recompiles Procedure cache hit ratio Your disk IO may be high which is driving up the CPU You may need more RAM which is causing the CPU and Disk IO to go up You may need to add indexes to [...]

View Answer   |  November 21, 2008  6:47 PM
CPU usage, SQL Server 2005, SQL Server performance, Timesheet software, Windows Server 2003
answered by:
64,520 pts.

Need SQL query
I woud sujest this .. This gives you the result wanted in less time. query optimized and tested. with a.temp (j_date,cnt) as ( select join_date,count(*) as c1 from a.emp_table group by join_date ) select j_date from a.temp where cnt= (select max(cnt) from a.temp) concepts used … GROUP BY , Temporary table 1. The query <b>select [...]

View Answer   |  November 21, 2008  6:40 AM
SQL development, SQL Query, SQL tables
answered by:
15 pts.

Email notifications in SQL Server 2000 Enterprise Edition
Here is a list of articles regarding <a href=”http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-from-sql-server.html”>sending email notifications from SQL 2000</a>. Hopefully you will get all the answers you need there.

View Answer   |  November 20, 2008  4:24 PM
Email notification, SQL Server 2000, SQL Server Agent
answered by:
56,975 pts.

Two programs with separate SQL Databases
It is possible to run two different programs which use a sql database on thesame machine, yes. My question would be are you sure you have enough resources on that machine to handle the load? Also, do you have enough disk space for both? It would also be helpful to know what version of sql [...]

View Answer   |  November 20, 2008  3:26 PM
Database, SQL, SQL Database
answered by:
56,975 pts.

deployment
Are you using the express or developer edition ? As the message says, the problem could be caused by the fact that these editions do not allow remote connections by default. This is what is needed to allow remote connections: - Enable remote connections on the instance of SQL Server that you want to connect [...]

View Answer   |  November 20, 2008  2:30 PM
SQL error messages, SQL scripts, SQL Server 2005
answered by:
63,535 pts.

Community Update: New Member Contest – Earn Knowledge Points and win!!
<b>This is open to any members who can shop on Amazon.com and have a valid email address.</b> CarlosDL has surpassed 500 Knowledge Points for this month already. We can know add MrDenny to the list. Flame has now joined the group. Who will be next? 11/17 Techochic Labnuke99 Gilly400 still a lot of time left [...]

View Answer   |  November 19, 2008  8:36 PM
AS/400, CIO, CRM, Database, Development, Exchange, Linux, Lotus Domino, Microsoft Windows, Mobile, Networking, Oracle, SAP, Security, SQL Server, Storage, Virtualization, VoIP
answered by:
16,755 pts.

Testing when primary and mirror SQL Servers are the same
Are you talking about using database mirroring back to the same SQL Server instance? If so, no, you’ll need to setup a second instance to mirror the data to.

View Answer   |  November 19, 2008  6:22 PM
Mirrored Server, SQL Server, Testing
answered by:
64,520 pts.

Advantages and disadvantages of certain SQL commands
<a href=”http://www.sqlcommands.net/”>Here is a good reference.</a> ————— BCP is not a command, is a tool. The main advantage of BCP is that, the user is not forced to have knowledge of T-SQL. BULK INSERT is the T-SQL command for the BCP utility, and the advantage is that it can be used within stored procedures or [...]

View Answer   |  November 19, 2008  5:06 PM
SELECT statement, SQL commands, SQL Server
answered by:
63,535 pts.

Installing SQL Server 2000 Enterprise Edition on Windows XP
<a href=”http://www.devhood.com/messages/message_view-2.aspx?thread_id=92975″>This discussion page may help you.</a> <a href=”http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1058382,00.html”>This page </a>gives a concrete answer, in short, you can’t do this. I quote “When installing SQL Server 2000 on a Windows XP machine, you could NOT have installed successfully on another machine using the same CD. The Enterprise Edition of SQL Server will ONLY install on [...]

View Answer   |  November 19, 2008  4:31 PM
SQL Server 2000, SQL Server installation, Windows XP Professional
answered by:
63,535 pts.

Error message in the Copy Database Wizard in SQL Server 2005
You didn’t say, but the error tells you to install the sql management tools on the remote computer. Have you done so?

View Answer   |  November 19, 2008  4:01 PM
Copy Database Wizard, SQL Server 2005, SQL Server errors
answered by:
56,975 pts.