Viewing 15 posts - 10,921 through 10,935 (of 13,462 total)
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...
June 29, 2009 at 6:37 am
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 =...
June 29, 2009 at 6:23 am
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...
June 26, 2009 at 11:22 am
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...
June 26, 2009 at 9:33 am
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"...
June 26, 2009 at 8:48 am
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...
June 25, 2009 at 6:01 pm
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...
June 25, 2009 at 11:25 am
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...
June 25, 2009 at 11:13 am
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...
June 25, 2009 at 10:59 am
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...
June 25, 2009 at 10:24 am
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...
June 25, 2009 at 10:18 am
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
June 24, 2009 at 1:09 pm
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...
June 24, 2009 at 12:15 pm
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...
June 24, 2009 at 9:39 am
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
June 24, 2009 at 9:24 am
Viewing 15 posts - 10,921 through 10,935 (of 13,462 total)