Forum Replies Created

Viewing 15 posts - 5,356 through 5,370 (of 14,953 total)

  • RE: Alter database

    Add the Alter Database commands to your string in the variable, and then execute the string.

    declare @Cmd varchar(8000);

    select @Cmd = 'alter database MyDB add file ...' -- put the rest...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Pivot with dynamic number of columns

    Do you want different columns, or do you want a comma-delimited list?

    You can do a dynamic pivot through dynamic SQL of various sorts. Simple-Talk (www.simple-talk.com) has a good article...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The Importance of My Cloud Data

    Redundancy is the only answer to this kind of thing that makes any kind of sense to me.

    Avoiding "the cloud" because it's "less secure" assumes that your local servers/computers are...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Memroy Issue

    I'm assuming you've looked at what Windows says is using the memory, in Task Manager. Right?

    What besides the OS and SQL Server is running on that server? What's...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Restoring a copy from a Log Shipped database

    I wouldn't mess with the log shipping, not if it's for DR purposes.

    Back up, compress, ship over, and so on.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Database mirroring

    I could be wrong, but I don't think it'll let you set up the same computer as all three. Mainly, why have a witness on the same as the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Slow creating a nonclustered index

    Is it being blocked by other processes in the table?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Alter database

    Are you trying to dynamically move the files?

    Why assume the files are in a default location, when you can query sys.database_files to get the exact data?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Migration from Oracle 11g to SQL Server 2008 R2

    I'd start with just plain searching online for tools and articles. I plugged "migrate oracle to sql server" into Bing (use whatever search engine you like). The second...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Creating a clustered index on Getdate function

    It is definitely possible. Sometimes it's even the best column for that.

    It'll depend on how you're using it. What does the column mean in the data?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Simple question - Query to find text that contains an apostrophe

    It sounds like you're working on preventing SQL injection in dynamic SQL. Is that correct?

    If so, have you looked into using sp_executesql for parameterized queries instead of executing a...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SQL to get specific table name that satisfy a condition

    On the cursor definition, you can change that from a Left Outer join to an Inner Join. The Where clause forces that anyway.

    Glad I could help out.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Grant Fritchey (1/12/2011)


    WayneS (1/12/2011)


    Grant Fritchey (1/12/2011)


    Anyone interested in reading a short blog post? I'm a little nervous about putting this one up. I'm talking about how heaps are stored and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Querying the Event Log Via SQL Server

    Take a look at xp_readerrorlog and see if that will do what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Building Better Communication Skills

    michael sorens (1/10/2011)


    Long ago I heard a similar comment that newspaper articles are aimed at an eighth grade level. On any given day I can usually find a newspaper clipping...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 5,356 through 5,370 (of 14,953 total)