Forum Replies Created

Viewing 15 posts - 6,511 through 6,525 (of 13,460 total)

  • RE: Tracing the output.

    you'll have to change the path in two palces;

    mine was

    C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\TraceFileName'

    on my machine, running SQLR2, i think you had a different one; change it and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Tracing the output.

    --declare variables for parameterizing the command

    declare @traceidout int

    declare @options ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to automate database scripting

    Roust_m (10/18/2011)


    No, I can't do it manually all the time, I need this to be run via an sql job on a regular basis. It looks like Powershell is...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Creating a function to replace symbols with HTML names

    here's anotehr version i just got working as a function;

    it's using a Tally table to swap char by char, based on the ascii() code of the character in question: i...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: display column name when bit on is found for any fields

    what if more than one bit is true?

    SELECT id,'NAME' As Results from YourTable where name=1

    UNION

    SELECT id,'ADDRESS' As Results from YourTable where address=1

    UNION

    SELECT id, 'EMAIL' As Results...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trying to find indexes only in sysindexes table

    i ran mine on SQL 2005/2008; the views may report different results between versions, i guess.

    how about ....WHERE name like '_WA_Sys_%'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    OK updated yet again...same old links but new code.

    sp_GetDDLa_Latest.txt (Returns Table)

    sp_GetDDL_Latest.txt (Returns varchar(max) )

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trying to find indexes only in sysindexes table

    statistics can be identified like this, i believe:

    select

    OBJECT_NAME(id),*

    from sysindexes

    where first is null --NULL for statsitics

    and indid >0 --avoid HEAP indexes

    they typically have a name that starts with...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    ahh, i had seen that once before...i'll fix that right now.

    I can't thank you enough; another pair of eyes, doing work outside of my typical work load and comfort zone...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Logon Trigger to restrict a program, but allow for specific users?

    an example might be a logon trigger that is supposed to write to an audit table...suppose it said INSERT INTO MyAuditTable

    SELECT ....

    what's the database context? depending on the user, it...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    kbleeker (10/18/2011)


    Hi Lowell - I made a change which appears to have sorted out the comma, but I'd like to know whether removing the space padding might have som drawback...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to generate script for database mail?

    by the topic, it sounds like he wants to script out the database mails ettings, not how to send database mail.

    my old post here has an awesome script for that:

    Script...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    I tweaked both procs to quotename the index column names, and also to replace unix style code to end with vbCrLf;

    same links as below, cna you retry by downloading the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Tracing the output.

    shiv-356842 (10/18/2011)


    Hi Team,

    I m Executing the above script

    in MASTER DB

    but i m getting below Error can you please suggest me.

    Msg 2812, Level 16, State 62, Line 1

    Could not find...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    kbleeker (10/18/2011)


    Hey again.

    I saw in the SP that you insert the data into @Results, so I caught the contents of that - check out the index_name and index_columns_key columns(only 2...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 6,511 through 6,525 (of 13,460 total)