Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Dynamically script Create Database For Attach For All Databases Expand / Collapse
Author
Message
Posted Saturday, May 16, 2009 4:55 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 5:04 PM
Points: 2,107, Visits: 3,581
Comments posted to this topic are about the item Dynamically script Create Database For Attach For All Databases

David

@SQLTentmaker
SQL Tentmaker
“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Post #718567
Posted Monday, June 1, 2009 11:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 28, 2013 8:38 PM
Points: 3, Visits: 47
Will this script work for databases using the FILESTREAM feature in SQL Server 2008?
Post #727157
Posted Tuesday, June 2, 2009 8:22 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 5:04 PM
Points: 2,107, Visits: 3,581
I did not include that in this design but could look into that as well.

David

@SQLTentmaker
SQL Tentmaker
“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Post #727834
Posted Wednesday, June 3, 2009 12:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 28, 2013 8:38 PM
Points: 3, Visits: 47
Thx!
Post #727908
Posted Friday, July 31, 2009 3:16 PM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Yesterday @ 10:01 PM
Points: 623, Visits: 2,141
Sweet code.

On the
SELECT @a = (SELECT SUBSTRING(@a,1,LEN(@a)- 1)) 
--Trim off the final comma; I'm sure there is a better way to do this...

Why not just do a
SELECT @a = LEFT(@a,LEN(@a)- 1)





----------------
Jim P.

A little bit of this and a little byte of that can cause bloatware.
Post #763407
Posted Friday, July 31, 2009 3:21 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 5:04 PM
Points: 2,107, Visits: 3,581
A lot of the code is sourced from another script posted by another user on the site. I reference the original script when I posted my version so that proper credit could be given. That particular section of code came with the original script. I will look at adding that in my version though. Thanks for the suggestion!



David

@SQLTentmaker
SQL Tentmaker
“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Post #763410
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse