Forum Replies Created

Viewing 15 posts - 61 through 75 (of 166 total)

  • RE: Database roles

    The script used to create a role would be:

    exec sp_addrole N'rolename'

    Then to add permission you would need to specify the permission as well the object such as:

    GRANT  SELECT  ON [dbo].[tablename]...

  • RE: How to find different and append new record

    Without knowing the exact DDL of the user table and what data resides in the Excel sheet it's dificult to give a detailed answer.  However, the general process could be...

  • RE: How to restore a database with ''''-'''' in the name

    This should work:

    RESTORE DATABASE [corp-reports] FROM  DISK = N'C:\corp-reports'

     

  • RE: Just to know which method to use

    I have always gone the route of a Linked Server since it is easilly documentable and it allows for integrated security to be defined at the link level.

  • RE: Historical connection history

    I would set up a trace on that database that dumps the results to a table.  You can then analyze connections whenever you like.

  • RE: do it in database layer or application layer

    I had this same problem and unfortunatly we did not find a way to do this other than wrapping all of the procedure calls into one stored procedure.  When we...

  • RE: Recrusive sp

    Would This Work:

    DECLARE @grp VARCHAR(50)

    SELECT MEM

    FROM  GRPMEM

    WHERE  (GRP LIKE @grp OR GRP IN (

    SELECT GRP

    FROM GRPMEM

    WHERE GRP IN (SELECT MEM FROM GRPMEM WHERE GRP LIKE @grp)

    )) AND MEM NOT IN (SELECT...

  • RE: Transaction log Truncated

    After starting at a new job I inherited a number of these types of situations.  The problem here was the recovery option on the databases was set to Full but...

  • RE: Transaction log backup

    Probably the easiest ways for you to do this is to use the Maintence Plan Wizard.  Using this you will be able to set up a job that will backup...

  • RE: Login failed for user ''''sa''''

    Is the authentication set to NT only, or mixed mode?

  • RE: Scheduled job fails

    An uimportant thing to consider here is that when a job is executed it is done so under the credentials of the user which is running the SQL Server Agent. ...

  • RE: Simple SQL script...

    Would somthing like this work:

    SELECT a.ID,

     a.NAME,

     b.TABLE,

     b.MEMO

    FROM  SALE a LEFT OUTER JOIN MEMO b

    ON  a.SID = b.RECORDID AND MTABLE LIKE 'SALE'

  • RE: copying from one database to another - but only new data?

    Asssuming there is the same unique key in both tables youcould simply do this using a query like:

    INSERT INTO table1

    SELECT * FROM table2 WHERE ID NOT IN (SELECT ID FROM...

  • RE: Application based security

    We actually use the UDL method but we place the UDL files in a secured location that can only be opened by the DBA group.

  • RE: "String or binary data would be truncated"

    When I had to do this in the past what I did was create a table with fields I knew would be large enough.  Then ran the LEN function against...

Viewing 15 posts - 61 through 75 (of 166 total)