![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What I need is to know if a database is Restoring.. or Offline... |
|
Hi I need to create a SP with the following fake code: (Sql Server 2005) ... If DB1 is available and DB2 is available Insert into DB3 Select field1, field2 from DB1 Insert into DB3 Select field1, field2 from DB2 Where status = 1 Else Insert into DB3 Select 'One of databases is not available','0' End What I need is to know if a database is Restoring.. or Offline... Thanks in advanced |
#3
| |||
| |||
|
|
Hi I need to create a SP with the following fake code: (Sql Server 2005) ... If DB1 is available and DB2 is available Insert into DB3 Select field1, field2 from DB1 Insert into DB3 Select field1, field2 from DB2 Where status = 1 Else Insert into DB3 Select 'One of databases is not available','0' End What I need is to know if a database is Restoring.. or Offline... Thanks in advanced |
#4
| |||
| |||
|
|
Hi I need to create a SP with the following fake code: (Sql Server 2005) ... If DB1 is available and DB2 is available * * Insert into DB3 * * Select field1, field2 from DB1 * * Insert into DB3 * * Select field1, field2 from DB2 * * Where status = 1 Else * * Insert into DB3 * * Select 'One of databases is not available','0' End What I need is to know if a database is Restoring.. or Offline... Thanks in advanced |
#5
| |||
| |||
|
|
Don Juan wrote: Hi I need to create a SP with the following fake code: (Sql Server 2005) ... If DB1 is available and DB2 is available Insert into DB3 Select field1, field2 from DB1 Insert into DB3 Select field1, field2 from DB2 Where status = 1 Else Insert into DB3 Select 'One of databases is not available','0' End What I need is to know if a database is Restoring.. or Offline... Thanks in advanced There is this useful SP that can check remote or linked servers: http://www.sqldbatips.com/showcode.asp?ID=38 Steve |
![]() |
| Thread Tools | |
| Display Modes | |
| |