Viewing 15 posts - 436 through 450 (of 583 total)
Did you read the link in my signature? If not, please do so then post example tables and data and I may be able to help you further.
in any case...
August 13, 2009 at 7:52 am
you will need to use dynamic sql and make sure you have a linked server defined. You can use database_id > 4 to exclude system databases. you should used sys.databases...
August 12, 2009 at 1:56 pm
Here is an example to use to give you an idea of what can do to achieve desired result . Also, Please read the link in my signature for tips...
August 12, 2009 at 10:37 am
Julie, you are correct that exists tends to be better performing.
Drew, thanks for that query. It is pretty much what I was looking and it helped me find another criteria...
August 11, 2009 at 3:08 pm
This work fine but I was hoping to be able to do this without having to query #tmp twice.
August 11, 2009 at 11:58 am
you can use sys.master_files instead of sys.database_files to get all databases on server.
August 10, 2009 at 12:00 pm
sp_spaceused will get you the info you need although it will only show you space used of current database.
August 10, 2009 at 9:34 am
Easiest way to do so is to detach database, move file, then re-attach.
August 7, 2009 at 12:09 pm
I have a script I was working with a while back that loads tables of user, groups and group membership from active directory using ADSI via a linked server. You...
August 5, 2009 at 8:09 am
this should give you all unused schemas
select b.name from sys.objects a
right outer join sys.schemas b
on a.schema_id = b.schema_id
where a.name is null
and b.schema_id > 4
and b.schema_id < 16384
August 5, 2009 at 7:46 am
this is for default constraints thus there will always be a column associated with them.
July 30, 2009 at 12:18 pm
I just posted a script to update all check constraints yesterday here. With some modification you can have it scripts out all constraints. Let me know if you need any...
July 30, 2009 at 8:41 am
Just whipped this up, so it is not tested very well but it should do the trick.
declare @defname varchar(100)
declare @tabname varchar(100)
declare @colname varchar(100)
declare @sql nvarchar(max)
DECLARE _def CURSOR
FORselect a.name, b.name,...
July 29, 2009 at 2:32 pm
do you want the existence of table(as in your subject heading) or a column (as stated in body)?
in any case this should get you what you need
create table #tmp(
databasename varchar(100),
tablename...
July 28, 2009 at 2:38 pm
Upon failover the cluster service will startup all services included in the cluster group thus if the sql server services are in the cluster group that is failing over then...
July 28, 2009 at 1:26 pm
Viewing 15 posts - 436 through 450 (of 583 total)