Forum Replies Created

Viewing 15 posts - 5,911 through 5,925 (of 14,953 total)

  • RE: Granting rights to a user for all DB's

    Check out sp_MSForEachDB and see if that will do what you need.

    Or create a group that has read/write access to all databases, and add him to that group instead of...

    - 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: Take fullbackup if new database has been created

    There are a few things you could do.

    One would be to add a check to your hourly job for databases with no backup history.

    One would be to run...

    - 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: Work around for SQL server performance issue

    On the first stored procedure, I'd convert all the inserts into the table variable into a single CTE, with a few OR statements in the Where clause. Then get...

    - 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: Reading SQL Server's Transaction Log

    It's definitely not useless data. It's very useful. It just needs some caveats, which it has. It's a good article and obviously took a lot of work...

    - 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: Pass DB name as parameter to a SQL statement

    If the value will come in any way from user input, make sure to check it against sys.databases, before you build it into a string you're going to execute.

    First, it...

    - 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: Identity messed up on merge replication

    You're welcome.

    - 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: Pass Parameter technique

    You'd use string concatenation.

    Say, for example, you have three search fields: First Name, Last Name, Department

    If someone fills in Last Name only, you'd have:

    "Where LName = 'whatever they typed'"

    If they...

    - 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: Automated Driving

    CirquedeSQLeil (11/22/2010)


    GSquared (11/22/2010)


    CirquedeSQLeil (11/22/2010)


    Great Idea - not sure it is feasible. Issues are a plenty with something like this - virus in the system, hackers, bugs, system outages (during...

    - 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 Row Level Security in a Relational World?

    You can't just split up rows by group, you have to indicate what groups can view what what rows, and that's essentially a many-to-many join. Those can be efficient,...

    - 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: need help with loading a string

    Try something like this:

    DECLARE @String VARCHAR(100);

    SELECT @String = '122 campbell ave., west haven, CT 00000-0000';

    SELECT

    SUBSTRING(@String,

    0,

    CHARINDEX(',', @String)),

    SUBSTRING(@String,

    CHARINDEX(',', @String)+1,

    CHARINDEX(',', @String, CHARINDEX(',', @String)+1)-CHARINDEX(',', @String)-1),

    SUBSTRING(@String,

    CHARINDEX(',', @String, CHARINDEX(',', @String)+1)+2, 2),

    SUBSTRING(@String,

    CHARINDEX(',',...

    - 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 Row Level Security in a Relational World?

    Right, but do the groups overlap on what data they can see?

    - 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: Restore from 2008 R2 TRM to 2005 SP2 - is it possible?

    You can't restore databases to prior versions of SQL Server. Can't detach-reattach back versions either, for the same reasons.

    Import/Export will work. Either with a wizard or with SSIS,...

    - 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: help me creating query

    Would adding a row_number() column (that's a function) 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: SQL Row Level Security in a Relational World?

    Is the security hierarchical? As in, do people in Group A get to see their own data, and that of Group B and Group C, while Group B can...

    - 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: Identity messed up on merge replication

    Unfortunately, I'm not particularly familiar with merge replication. I'm more accustomed to either transactional or snapshot. Can't really help you on that point.

    If it were me, I'd read...

    - 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,911 through 5,925 (of 14,953 total)