Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 13,465 total)

  • RE: linked database opinion?

    sqlguy-736318 (9/13/2012)


    What if the core datamodel is for read-only purposes? Applications could each have their own database and connect to the core database for read-only purposes.

    If all the databases reside...

  • RE: Using Print, will it slow down procedure?

    if you are running the process in SSMS, then there'd be an impact for sure; just check Task Manager: SSMS will be bloated with memory, since it's storing all that...

  • RE: What is Proper Steps to Remove FileGroups

    something like this might help you identify all the objects that are still in the filegroup(s) in question.

    you would have to move the clstered index of any tables that exist...

  • RE: Timestamp conversion

    jdbrown239 (9/13/2012)


    In the syssubscriptions table the time stamp is 0x000000000404BAA0. How do I convert that to something i can read like date_time?

    the datatype TIMESTAMP is horribly named,and is actually an...

  • RE: linked database opinion?

    my two cents:

    There's no way to enforce referencial integrity (easily) between databases; you can try putting contraints using user defined functions, but that does nto guarantee anything,a s the...

  • RE: encrypt password in sql server database

    And some examples for you:

    --Two way example

    --http://www.databasejournal.com/features/mssql/article.php/3714031/SQL-Server-2005-Encryption-types.htm

    -- EncryptByPassPhrase(@password,@DataToEncrypt )

    select EncryptedData = EncryptByPassPhrase('My$ecret|<ey', '123456789' )

    -- DecryptByPassPhrase(@password,@DataToDecrypt )

    declare @val varbinary(max)

    SET @val = 0x0100000084F9C2DF2BC4518DFDA73E9C054E709F4039E7B831FF695F12621BEC05509E34

    select convert(varchar(100),DecryptByPassPhrase('My$ecret|<ey',@val))

    --one way example: compare the hash:

    declare @val varbinary(max)

    SELECT @val...

  • RE: Standard Edition Auditing

    DBA_Learner (9/13/2012)


    CDC captures only insert,update,delete on tables..but I don't think it captures drop,truncate,select ...Also in order to create that we need sql agent which on back ground runs the jobs..It...

  • RE: Standard Edition Auditing

    if you want to keep track of old and new values, I think the Change Data Capture is what you are after;

    there is a project on codeplex which adds a...

  • RE: CONCATINATE 3 COLUMNS (int) INTO A WORKABLE DATE FORMAT

    personally, since you have integers, i'd stick with using the dATEADD() functions:

    /*

    2012-02-01 00:00:00.000

    2012-03-01 00:00:00.000

    2012-04-01 00:00:00.000

    */

    CREATE TABLE PS_TestForOnline

    (

    DAY_ INT,

    MONTH_ INT,

    YEAR_ INT

    );

    INSERT INTO PS_TestForOnline

    VALUES(1,1,2012);

    INSERT INTO PS_TestForOnline

    VALUES(1,2,2012);

    INSERT INTO PS_TestForOnline

    VALUES(1,3,2012);

    SELECT DATEADD(dd,DAY_...

  • RE: Data Comparison

    the trick is to join the table agaisnt itself.

    With MyCTE (GroupID,Item,Permission)

    AS

    (

    SELECT '123','D-Report','Y' UNION ALL

    SELECT '123','G-Report','Y' UNION ALL

    SELECT '134','D-Report','Y' UNION ALL

    SELECT '134','G-Report','N'

    )

    SELECT * FROM...

  • RE: SQL Server Audit

    If you need someone with more experience to actually set this up for you, consdier grabbing a consultant or a DBA you know and trust. Believe me, I know anything...

  • RE: SQL Server Audit

    raj_melvin (9/12/2012)


    Thanks for your reply.

    Trigger - yes it's working solution But the company doen't wanted to use the trigger

    SQL Profiler - unable to trace it in a table - Getting...

  • RE: Catach failed logins with xp_readerrorlog

    just a basic syntax issue when you are assigning values to variables;

    isntead of this:

    --incorrect code

    set @cnt = (select count(*) from #tbl2)

    set @LDate = select top 1 (LogDate) from @ErrorLog

    --valid code

    select...

  • RE: SQL Server Audit

    raj_melvin (9/11/2012)


    Could any one please help.thanks in advance.

    help with what? you already determined SQL Audit doesn't do what you are asking, right? and I gave you two working examples, one...

Viewing 15 posts - 4,741 through 4,755 (of 13,465 total)