Forum Replies Created

Viewing 15 posts - 5,071 through 5,085 (of 13,460 total)

  • RE: Drop SP without USE <database>

    how about dynamic SQL?

    execute ('use Perfect1012;drop procedure dbo.pr_fake')

    works for me.

    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: procedure started taking longer time to retrieve data in last two days

    aww,at 1000+ lines of code, without the underlying base tables and linked server(EDWGEARS),

    that one is a little bigger scope than i can help with as a volunteer;

    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: procedure started taking longer time to retrieve data in last two days

    well there you go!

    i see a couple of things;

    the plan shows two cursors doing stuff to at least 580 rows;

    those cursors can be eliminated and replaced witha set...

    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: Performance when adding PK

    chriskellerx10 (8/2/2012)


    What is the best way to give you this information? As far as the schema and clustering? I have never created and clusters before.

    Sorry for my limited knowledge...

    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 trouble shoot and restore the access?

    something missing from your post is the state

    with the state, you know what the actual problem is:

    http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx

    ERROR STATE ERROR DESCRIPTION

    2 and 5 ...

    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: use xp_cmdshell in OPENROWSET

    try this: adding SET FMTONLY OFF works for me:

    i tested from a 2005 to a 2008 openrowset:

    SELECT *

    FROM OPENROWSET ('SQLOLEDB','SERVER=DEV223;UID=sa;PWD=NotTheRealpassword;','Set FmtOnly OFF;exec master..xp_cmdshell ''dir c:\'' '

    ) t

    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: use xp_cmdshell in OPENROWSET

    nzhang6666 (8/2/2012)


    benjamin.reyes (8/2/2012)


    First that the login you're using has access to the C drive on the testserver. I'd then also check that xp_cmdshell was enabled.

    I can use the sa...

    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: Just a rant about how third parties design apps

    jeff.mason (8/2/2012)


    opc.three (8/2/2012)


    jeff.mason (8/2/2012)


    If someone wants to add a column to the middle of a table, they should get better SQL training.

    This is exactly what Microsoft is up against. They...

    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: Need help writing an update (or insert maybe) query

    well, you could use a view on dbo.Incidents to automatically generate your calculation as a new column, or you could add a calculated, persisted column to the base tabe; both...

    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: procedure started taking longer time to retrieve data in last two days

    without the details my friend anthony is asking for, i'd WAG and say to update statistics on the underlying tables the procedure uses.

    out of date statistics are associated witht eh...

    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: Assign DML, DDL permission to login but not alter login, backup-restore, drop dbs

    well, based on your post, you said the users cannot select, and i'm guessing that is because you did not assign db_datareader.

    you'd have to report the specific error message they...

    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: return parent child relation

    an example of what Sean is asking you for: a CTE or CREATE TABLE with his first post:

    With MyCTE (PRNT,CHLD,POS)

    AS

    (

    SELECT '1050000','1000000','1' UNION ALL

    SELECT '1050000','5000000','2' UNION ALL

    SELECT...

    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: Assign DML, DDL permission to login but not alter login, backup-restore, drop dbs

    this warning is for the least common denominator thing:

    the Object Explorer warned you if you are not in the db_owner role, but if you test my role, you will...

    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: Assign DML, DDL permission to login but not alter login, backup-restore, drop dbs

    creating a custom role encompasing the specific requirements is a best practice.

    permissions should be assigned to custom roles, and users assigned to the custom roles.

    This makes migrating users from one...

    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: Assign DML, DDL permission to login but not alter login, backup-restore, drop dbs

    here's my suggestion:

    create this role in each of the ten databases in question.

    add the logins of the developers as users to each of the ten databases.

    add the users to this...

    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 - 5,071 through 5,085 (of 13,460 total)