Forum Replies Created

Viewing 15 posts - 10,921 through 10,935 (of 13,462 total)

  • RE: Restore database without restoring data

    RESTORE DATABASE myDatabase WITH RECOVERY would work only if there is already a backup in place and you want to restore the default backup. if this is on a diffrerent...

  • RE: Restore database without restoring data

    you'll want to read up on RESTORE from Books online; if you are restoring from a file, the command would look something like this:

    RESTORE DATABASE [YOURDB]

    FROM DISK =...

  • RE: Help with importing data

    data like this is tough; i always do this via TSQL and not through SSIS, just because I'm more familiar with TSQL.

    Here's how i would do it:

    I'd grab the entire...

  • RE: using stored procedures

    you can create a table, and then insert into it directly, but if you alter a table, a GO statement is expected.

    simply create your table with the constraint in a...

  • RE: Sql Server Programming:

    One of the harder concepts to grasp is how SQL server works with Set Based operations, compared to programmatically based processing, which thinks about processing data "Row By Agonizing Row"...

  • RE: urgent help

    since from the perspective of the server you are looking at, the mdf files are located on a \\UNC drive, I'd speculate that an instance of SQL server on...

  • RE: urgent help

    if you have the mdf and ldf files, in SSMS in the Object Explorer window on the left, you would simply right click on the Database Folder and select Attach...

    then...

  • RE: viewing who has seen the data

    easy enough middletree;

    add the procedure and run it on your test server.

    then immediately run this statement:

    select * from sp_DMLTrace

    you'll get results for at least 5 rows, which include the commands...

  • RE: urgent help

    if the files are "in use", could it be that someone renamed database "D1" to another name?

    With the select * from sysdatabases, Can you check the filename column and...

  • RE: viewing who has seen the data

    a DML trigger tells you who CHANGED data...doesn't help with trying to find who SELECTED data.

    a DDL trigger tells you who CHANGED a table structure, , so it again does...

  • RE: table Variables as Parameters

    Carl, your example is for SQL 2008, right? I had previously understood that in 2008 you could use the table variables for parameters, and when i tested your code, it...

  • RE: Using a UDF to provide a value for an insert statement

    functions almost always need to be preceded with the owner/schema

    so either of these should work:

    Insert into newtable (trainingType, otherCols)

    values (dbo.fnType(@varcharType), OtherValues)

    or

    Insert into newtable (trainingType, otherCols)

    select dbo.fnType(@varcharType), OtherValues

  • RE: Contains() won't search certain words

    yes, there is a file that contains all the "noise" words that will be ignored.

    on my dev machine, you it is named "noiseENG.txt or noiseENU.txt , and resides in the...

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    glad i could help out; good luck on your project.

    when you have time, you should add how to add other types of linked servers to your snippets of code; it's...

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    that's easy; the views sysservers or sys.servers hold all the linked server information, so something like this would work fine;

    if exists(select * from sysservers where name='MyLinkedServer')

    BEGIN

    exec sp_dropserver 'MyLinkedServer','DropLogins'

    END

Viewing 15 posts - 10,921 through 10,935 (of 13,462 total)