Viewing 15 posts - 346 through 360 (of 404 total)
Please see the below link
June 24, 2009 at 4:04 am
try
convert(datetime,'date',101)
June 24, 2009 at 3:35 am
1) Create a linked server
2) execute sp_start_job in msdb
eg
execute serverB.msdb.dbo.sp_start_job 'Jobname'
June 24, 2009 at 3:11 am
Check the size of the table as well. For smaller tables, rebuiding may not remove fragmentation.
June 24, 2009 at 3:07 am
Do you have backups? I think you might need to restore the database from recent backup.
See Paul Randal's blog below
http://www.sqlskills.com/blogs/paul/post/CHECKDB-From-Every-Angle-Can-CHECKDB-repair-everything.aspx
Edit: added Paul's link
June 23, 2009 at 11:23 pm
jcrawf02 (6/23/2009)
jeffrey yao (6/22/2009)
June 23, 2009 at 7:22 am
insert into dbo.changelog(
databasename, eventtype,
objectname, objecttype,
sqlcommand,eventdate, loginname)
values(
@data.value('(/EVENT_INSTANCE/DatabaseName)[1]', 'varchar(256)'),
@data.value('(/EVENT_INSTANCE/EventType)[1]', 'varchar(50)'),
@data.value('(/EVENT_INSTANCE/ObjectName)[1]', 'varchar(256)'),
@data.value('(/EVENT_INSTANCE/ObjectType)[1]', 'varchar(25)'),
@data.value('(/EVENT_INSTANCE/TSQLCommand)[1]', 'varchar(max)'),
getdate(),
June 23, 2009 at 1:16 am
select count(*) from sysindexes where indid in (0,1)
Edit: This will return all tables including system tables.
Check
select object_name(id) from sysindexes where indid in (0,1)
If you need user tables only, use syobjects...
June 22, 2009 at 1:25 am
If your database size is small you can have a maintenance plan to rebuild all index for the database.
If its a large database, you may have to write your custom...
June 22, 2009 at 12:39 am
You can use maintenance plan to delete old backups.
But since you are appending backups to a single file, this may not be possible. While taking backups, select option to create...
June 22, 2009 at 12:35 am
you will get the spid of the blocking connection in sysprocesses.
use
DBCC INPUTBUFFER(spid)
to get the query
June 19, 2009 at 6:28 am
Which version of SQL server you are using?
You might be looking for rank() or row_number function
June 19, 2009 at 5:22 am
The condition will cancel each other.
Why don't you try '% customers %' assuming there will be a space before and after the view in your query
June 19, 2009 at 3:56 am
Viewing 15 posts - 346 through 360 (of 404 total)