Forum Replies Created

Viewing 15 posts - 5,191 through 5,205 (of 14,953 total)

  • RE: Re-Sync logins

    Create a script that will step through the existing user accounts (sys.sysusers) and delete those that you don't want and that don't match up to sys.syslogins. Then have 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: Return of "The server principal ProcedureExecutor is not able to access the database"

    Check out sys.sysusers. The "sid" column matches up the PK in sys.syslogins.

    - 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: Input data with mulit records for a parameter.

    There's a good article on string splitting (and related Numbers table functions), here: http://www.simple-talk.com/sql/t-sql-programming/the-helper-table-workbench/

    - 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: Merge two rows with using date and time

    Something like this:

    select *

    from MyTable

    where datepart(minute, [Date and Time]) = 0;

    That should give you the rows that end on-the-hour.

    select *,

    (select case when exists (select 1 from MyTable as...

    - 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: Return of "The server principal ProcedureExecutor is not able to access the database"

    Is it possible there are two versions of the login, tied to different server-level user IDs?

    - 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: Problem with Trigger

    The trigger simply selects from "inserted". That'll handle multi-row inserts.

    I would suspect constraint/nullability violations, or explicit/implicit rollbacks.

    - 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: Merge two rows with using date and time

    Are you familiar with the various date and time functions in T-SQL?

    You could query the table Where datepart(minute) = 0 and get all the rows where it's on-the-hour, and then...

    - 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: how to reduce the impact of an UPDATE LOCK

    Update will take the locks it needs.

    You might look into isolation levels. Snapshot (couple of flavors here) isolation can really improve concurrency in some cases.

    - 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: Getting Fixed Drives Total Space and Free Space by using SSIS package using WMI queries

    I use a CLR function for that. Would that give you 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: properties of system sproc's in system db's

    What "properties" are you looking for? Stored procedures don't have a "properties" tab that I know of, whether server or user-built.

    - 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: Calculating time difference within series

    The usual way to do this kind of thing is:

    select Col1, Col2, DateTimeCol,

    (select min(DateTimeCol)

    from MyTable as MyTable2

    where MyTable2.Col1 = MyTable1.Col1

    and MyTable2.Col2 =...

    - 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: Question On Returning The Earliest Date

    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: Exporting Fixed width files

    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: Login Failure Auditing + Profile trace

    All Profiler does is run a trace. Create a server-side trace, and you can have it run constantly or you can use an SQL Agent job to schedule 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: ssis - error handling testing not working as i expected

    If I'm following you correctly, you have a task that fails (on purpose), and it has an on-failure path from it, which isn't being called when it fails. Is...

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