Forum Replies Created

Viewing 15 posts - 4,756 through 4,770 (of 13,460 total)

  • RE: Need a SQL query to list the table names used in a view.

    neellotus07 (9/12/2012)


    Hi Lowell,

    Your query showing tables of any view, but if view contains another view then it is not showing name of that view.

    Can u help me in this regard.

    Thanx...

    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 copy the structure of a database?

    probably the easiest way is to use the Scripting wizard in SSMS;

    right click on the database in question, Choose "Tasks", then "Generate Scripts"

    follow the wizard prompts;

    you might need 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: CTE

    f9c882q 61644 (9/10/2012)


    Does a report user need to have read and write access to a tbale or stored procedure in oder to run a report with CTE?

    the CTE doesn't matter,...

    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: Needed database level permissions script for whole instance

    johnnyrmtl (9/10/2012)


    Thanks for that and it does indeed work on a sole database at a time.

    I would need it to run from master and get all databases

    you would jsut wrap...

    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 Server Audit

    raj_melvin (9/10/2012)


    we are fine to log into a flat file

    but I am unable to capture the required informations like " Hostname" ,"local ip" and "Application Name" ect.

    this is for a...

    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 Server Audit

    raj_melvin (9/10/2012)


    Thanks Very Much this is really usefull.

    Appriciate your help.

    is there is anyway we can get the same output using the SQL Audit

    please help,

    To the best of my knowledge, SQL...

    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: Fix orphaned users created WITHOUT LOGIN.

    FreeHansje (9/10/2012)


    So I have restored a database to a new server and a check reveals a DB-user being orphaned. However, this user must have been created as CREATE USER WITHOUT...

    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 Server Audit

    raj_melvin (9/10/2012)


    Logon trigger - In case any issue with the trigger this will not allow any users to login into the DB.

    outpout in table is more preferable.

    a well written trigger...

    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: send email from sql

    samaneh.lashgari82 (9/9/2012)


    i want use sp for sending because when in search about this subject i found about create profile and account for data base mail...can i sent mail from sql...

    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 a SQL query to list the table names used in a view.

    including the columns referenced:

    select

    OBJECT_NAME(depz.object_id),

    OBJECT_NAME(depz.referenced_major_id),

    colz.name,

    *

    from sys.sql_dependencies depz

    left outer join sys.columns colz

    on depz.object_id = colz.object_id

    and depz.referenced_minor_id=colz.column_id

    where ...

    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: Document First, Code Later

    This is one of those "in a perfect world "scenarios, in my case.

    I can see that for large projects, but what about smaller projects or enhancements?

    There was a recent...

    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: Needed database level permissions script for whole instance

    I have this saved in my snippets that seems to do a good job of generating explicit permissions;

    does this produce the results you are after for a single database?

    select sys.schemas.name...

    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: Tricky REPLACE problem

    ok here's a quick prototype i *think* does what you are asking;

    it's basically a power-replace that cross joins your funciton symbols with a know list of repalces;

    does this work 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 find out which store procedure making a table?

    you would have to search the definition of the procedures to search for the CREATE TABLE statemenet;

    SQL does not save information about who or what created any objects...just the create...

    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: Tricky REPLACE problem

    the problem with abstracting out the problem is it hides the actual issue.

    i suspect that this would involve splitting ont he # sign, cleaning up any elements that meet 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!

Viewing 15 posts - 4,756 through 4,770 (of 13,460 total)