Forum Replies Created

Viewing 15 posts - 121 through 135 (of 147 total)

  • RE: updatable view

    I think it's going to be much easier to drop the default for the Oid field in both tables and set it externally. Then the inserts to the two...

  • RE: Get calling Procedure name in Trigger

    The only way I can think of to do it is to use one of the classic statement capture scripts in the trigger, eg.

    SELECT B.text

    FROM sys.dm_exec_requests A

    CROSS APPLY sys.dm_exec_sql_text(A.sql_handle) B

    where...

  • RE: Need to schedule a job that runs on all databases in an instance

    Obviously I don't know what's in your databasesize proc, but it should be possible to havce a single copy of that in the performance_unit (where you're writing the stats). ...

  • RE: user id table

    I don't have an SQL2k machine handy, but from memory syslogins is a view of the sysxlogins table. If you're after only the names then either is fine.

  • RE: Add Linked Server Nightmare

    I think what is happening is that the stroed procedure is executing as the SysAdmin user but when it executes anything with the exec command it opens a new connection...

  • RE: user id table

    Under SQL2k it's master..syslogins.

    In each user database there's a sysusers table, in which the SID maps back to the SID of the associated login in syslogins.

  • RE: Need help with differential backup restore

    Yes, when restoring the full backup you will need to specify either the NoRecovery or Standby option, leaving the database in a state that further differential (or log) backups can...

  • RE: Update a table by selecting the max record

    You need to do something like this:

    update Courses

    set ExpDate = dateadd(year, 3, ExpDate)

    from Courses a

    where a.StudentId = 112

    and a.CourseId = 124

    and a.ExpDate = (select max(b.ExpDate)

    from Courses b

    where a.StudentId =...

  • RE: Backup\restore: prod -->dev "must do's"

    The only thing that's truly mandatory when loading the database onto a different server is re-mapping and otherwise fixing up the logins/users.

    I'm a bit lost as to why something would...

  • RE: Restoring has failed during logshipping configuration

    NORECOVERY and STANDBY are mutually exclusive: you can have one or the other but not both.

    If you want users to be able to have read-only access to the log-shipped database...

  • RE: When to rebuild indexes

    On our systems that are used primarily for monthly reporting we reindex after the data has been loaded each month; others that are transactional systems but with a peak...

  • RE: Very Very urgent -reply needed

    Check the file/directory permissions. If the service account SQL Server is starting under doesn't have rights to the directory/file you'll get that message.

    A short-term fix might be to change...

  • RE: Manually Removing Replication

    If you're lucky this will fix it:

    exec sp_replicationdboption

    @dbname = N'AdventureWorks',

    @optname = N'merge publish', -- just 'publish' for transactional

    @value = N'false'

    I haven't looked to see whether it cleans up master...

  • RE: SQL Server Agent

    Another thing you do is to look in cliconfg to see what aliases are there.

  • RE: TEMP DB File layout

    We have instant initiailsation turned on for all our servers (SQL2k5+ that is). I know there's a theoretical overhead for every write if this is on (is page "zeroed...

Viewing 15 posts - 121 through 135 (of 147 total)