Viewing 15 posts - 5,146 through 5,160 (of 7,185 total)
Surely you don't need me to explain this to you? Read the error message. There's no such object as DB1.sys.principals. Why? Because there's no such database...
August 12, 2011 at 7:45 am
WITH Users AS (
SELECT 'DB1' DBName, [name] FROM DB1.sys.database_principals UNION ALL
SELECT 'DB2' DBName, [name] FROM DB2.sys.database_principals UNION ALL
SELECT 'DB3' DBName, [name] FROM DB3.sys.database_principals UNION ALL
SELECT 'DB4' DBName, [name] FROM DB4.sys.database_principals...
August 12, 2011 at 7:34 am
You could create a trigger on every table that you wish to protect in this way. The trigger would roll back the transaction if the deleted rows were more...
August 12, 2011 at 3:19 am
forsqlserver (8/12/2011)
Thanks, is there any msdn link on sql server and network service account.
I'm sure the search engine you use is as good as the one that I do.
Is there...
August 12, 2011 at 2:29 am
I'm sure if you really thought about it, you'd be able to answer that for yourself. Depends whether you want to find the text anywhere in the column's value...
August 12, 2011 at 2:17 am
I would strongly advise running your SQL Server services under a domain account. I don't know whether it's possible to grant access to Network Service on a remote computer,...
August 12, 2011 at 2:00 am
Yes. Use INFORMATION_SCHEMA.COLUMNS to find out which columns hold character data, and then build some dynamic SQL to search in all of those columns. Beware! Performance will...
August 12, 2011 at 1:55 am
ashok.faridabad1984 (8/12/2011)
Please help me if sysjobhistory table can help here and how..
Yes, sysjobhistory can help. You can interrogate it to find out which jobs have run and when, which...
August 12, 2011 at 1:22 am
Sri
I think you may be confusing primary key and clustered index here. When choosing a primary key, if one column uniquely identifies rows in the table, choose that. ...
August 11, 2011 at 8:34 am
s_osborne2 (8/11/2011)
Hi,Check this:
http://msdn.microsoft.com/en-us/library/ms186757.aspx
That'll probably do the trick for you.
Thanks,
Simon
What Ashok's asking is how to start the second job only on successful completion of the first. sp_start_job will start the...
August 11, 2011 at 6:48 am
You can use dynamic SQL, but it has its pitfalls - search for "curses and blessings of dynamic SQL" for a full discussion. Why not just take the maximum...
August 11, 2011 at 4:48 am
What exact syntax have you tried, and what errors, or unexpected results, do you get when you try it?
John
August 11, 2011 at 2:30 am
What do you want to set @Retval to - CO, [DATE] or CLNG_RATE?
John
August 10, 2011 at 7:11 am
Identity property doesn't guarantee uniqueness. Did that query I posted return any rows?
John
August 9, 2011 at 8:02 am
Have you checked your data? Does the ID column have a unique constraint on it?
Does this return anything:
select ID, COUNT(*) from MyTable group by ID having COUNT(*) > 1
John
August 9, 2011 at 7:59 am
Viewing 15 posts - 5,146 through 5,160 (of 7,185 total)