Forum Replies Created

Viewing 15 posts - 11,431 through 11,445 (of 13,460 total)

  • RE: Kill sessions before restore command

    this proc might come in handy: sp_kill

    usage is simply sp_kill YOURDBNAME

    kills all the sessions connected to the database you identify:

    [font="Courier New"]--enhanced 02/04/2005 to also list hostname

    CREATE PROCEDURE sp_Kill

    @DBNAME VARCHAR(30)

    --Stored...

    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 query instance ports.

    the info is in the registry...i've got this script saved in my snippets, it used to work well:

    CREATE TABLE #GetPort

    (

    token varchar(100),

    value varchar(20))

    go

    DECLARE @inst varchar(200)

    DECLARE @inst1 varchar(100)

    --Determine registry path and key

    IF(charindex('\',@@servername)...

    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: Random 64 Characters alphanumeric String

    great code examples; what if i wanted to generate X number strings, for arguments sake lets say 10...i can't seem to visualize how to generate multiple records though.

    rub my nose...

    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: What will happen to the view and the table in such scenario

    yes.

    whether the PK is identity, or a non identity PK:

    both of these examples work:

    [font="Courier New"]

    CREATE TABLE A( empno INT IDENTITY(1,1) PRIMARY KEY, emp VARCHAR(64),empaddress VARCHAR(64))

    GO

    CREATE VIEW V AS  SELECT empno, emp...

    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: Random 64 Characters alphanumeric String

    ahh Lynn I like that code;

    I parameterized the TOP (64) with @top, and can use that to generate any length whether 64 here, ro whatever i might need.

    very nice!

    Thanks...

    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: Restriction in INSERT

    i had to base the business rule on the prototype trigger you showed me, plus the 3 strikes your out rule.

    your trigger implied if 3 specific fields were NOT NULL,...

    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: Broken Tables

    never heard of the term "broken tables"....could you be more specific?

    are you getting an error, or some unexpected results? Can you explain it better or in a different way?

    it would...

    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: Restriction in INSERT

    i'm not sure what you want for the actual rule...you say both insert and update, and i don't know if you are talking about multiple rows or editing a single...

    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: Restriction in INSERT

    this is usually done at the presentation layer, not at the database level.

    this kind of logic is hard to do...what is meant by 3rd time? ever? or 3 times in...

    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 move Multiple Related Tables Data from one Database to another..

    thanks for the better look at the schema; all follow up after testing.

    you might be confused as to how the Identity() property on a column works, and also what 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: Working with SQL Servers Default Trace with the Function fn_Trace_Gettable()

    i think it was a script i wrote and contributed:

    Default Trace Load of All 5 Files

    something i put together because i got annoyed to have to find 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: How to move Multiple Related Tables Data from one Database to another..

    psuedocode sucks....i know...

    what are the REAL table names and theuir primary key columns....they aren't really named Table1 are they?

    can you post the CREATE TABLE for your 4 tables?

    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: Import table process

    sorry...

    my point is we need to fix the job, not continue to work around a time constriant and try to stop/disable/continue.

    lots of issues can be killing your job:

    out of...

    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: Invalid column name EE0_Classification

    it's always the little things that cost the largest amounts of time; I've gotten zapped like that when i was playing in case sensitive databases.

    an extra pair of eyes helps...

    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 move Multiple Related Tables Data from one Database to another..

    i always move the data in FK Hierarchy order; it makes sense when you look at it today, and 6 months from now when you add other tables.

    stored procedure 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!

Viewing 15 posts - 11,431 through 11,445 (of 13,460 total)