Forum Replies Created

Viewing 15 posts - 10,996 through 11,010 (of 13,460 total)

  • RE: SQL Permissions Newbie

    usually, i create two roles in this situation.

    one, just as you describe, that gives a user db_datareader and db_datawriter for example.

    then i create a second role, and it';s sole purpose...

    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: SQL scan on the network (is there a free tool for this)

    also SQL Recon from Special Ops Security[/url] is free and does a great job as well as doing some quickie analysis like blank passwords and a best guess at which...

    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: Syntax error near select.

    maybe something is missing in your code snippet, but you declare a variables like @activityID and @UpdateLogin, never assign them a value, but then use then to insert into...

    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: separate steps in a stored procedure

    i understand why you are breaking everything into step by step...it's easy to understand logically.

    however, perfomance wise, you can do everything together in one swoop...get the emails, remove duplicates, 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: separate steps in a stored procedure

    also, i notice you are inserting into two tables : "MasterList" and "maintable";

    i would think you would be inserting into just one temp table, right? and the exists should bee...

    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: separate steps in a stored procedure

    bit of a logic hole there.

    a GO statement cannot exist in a stored procedure. when you run that statement it creates a stored proc that only does one thing...deletes from...

    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: Syntax error near select.

    VALUES SELECT

    it's one or the other, never both...

    you either insert into (columnlist) values(val1,val2,etc)

    OR

    insert into (columnlist) select val1,val2,etc from somesource.

    an extra pair of eyes always helps in these situations..trees 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: Create exclusive lock for a period of time

    here's an example of Sergiy's suggestion:

    begin tran

    select top 1 * from mytable with (tablockx) --exclusive table lock this table to me and my transaction

    --do more stuff

    commit tran --commit the tran,...

    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: Issues with script for updating structures

    SET XACT_ABORT ON only works in combination with BEGIN TRAN and COMMIT TRAN.you set XACT_ABORT on just once...and that is how it works for the session, or until you explicitly...

    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: SQL Count Statement

    this is just a WAG, but every A.ItemCode would only have one status, right?

    don't you need a rollup by Customer of all the status?

    something like the query below, that you...

    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: Copy a table from a DB to another DB

    glad it worked for you; you clearly grasped the concept once you got an example.

    way to go.

    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: Linked Servers: SQL Native vs OLE DB Provider

    wouldn't problems with distributed transactions be because the "Distributed Transaction Coordinator" service one one or both servers are not running / on manual start instead of automatic?

    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: Linked Servers: SQL Native vs OLE DB Provider

    ok i learned i can alias a linked server, excellent...

    but even though i explicitly said to use a SQLOLEDB provider, when i look as sys.servers, SQLNCLI is being used, as...

    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: Linked Servers: SQL Native vs OLE DB Provider

    as i understand it, when a linked server is created between two 2005/08 servers, the linked server will always use the native client SQLNCLI provider instead of SQLOLEDB; if you...

    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: SQL Count Statement

    sorry bumble-read your post...my dyslexia kicked in and i thought i only saw CASE WHEN A.destroyed = 0 as the first case condition.

    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 - 10,996 through 11,010 (of 13,460 total)