Viewing 15 posts - 1,036 through 1,050 (of 1,065 total)
Instead of dynamic SQL, I recommend conditional execution like this:
alter proc Test_SP
@dbName Sysname
As
if @dbName = 'Database1'
begin
select * from Database1.dbo.TableName
end
else if @dbName = 'Database2'
begin
select * from Database2.dbo.TableName
end
Go
November 21, 2007 at 2:51 am
2- Re-indexing / integrity checks then backup databases
No point in taking backup of currupt database.
November 21, 2007 at 2:42 am
select distinct s2.ServerName, s2.DateFrom, s2.DateTo
from dbo.Server s1
inner join dbo.Server s2
on s2.ServerName = s1.ServerName
where s2.DateFrom >= s1.DateTo
union
select s.ServerName, s.DateFrom, DateTo
from dbo.Server s
inner join (
select ServerName, Min(DateFrom) DateFrom
from dbo.Server
group...
November 20, 2007 at 4:11 am
Thanks Steve, for the information about recovery.
November 19, 2007 at 8:22 am
See the query execution plan. Create suitable covering index.
November 19, 2007 at 3:58 am
The TIMESTAMP data type of SQL Server is not equivalent to DATETIME.
It is equivalent to BINARY(8).
November 19, 2007 at 2:48 am
Since this is a production server, DETACH option may not be suitable, as it makes the database OFFLINE.
November 19, 2007 at 2:25 am
Use STOPAT clause in the RESTORE statement to restore to a point in time.
November 19, 2007 at 2:15 am
It looks like in the trigger is trying to insert xml data into a column. However the length of the column is too small to hold the xml data. Therefore...
November 19, 2007 at 12:41 am
For moving use databases there are two options:
1) detach/attach
2) backup/restore
November 19, 2007 at 12:30 am
All other versions support job scheduling.
You are right. You can run a query as a job.
Minimun 1 minute.
November 15, 2007 at 8:26 am
Inteactive logon restriction does not impact SQL Server.
Becuase SQL Server is a service.
Services don't need interactive logon previlage.
November 15, 2007 at 8:17 am
Use "Maintenance Cleanup Task" to delete older .bak files.
Maintenance Plan automatically adds date time stamp to the filename.
e.g. master_backup_200711132245.bak
November 14, 2007 at 7:18 am
Viewing 15 posts - 1,036 through 1,050 (of 1,065 total)