Viewing 15 posts - 811 through 825 (of 1,156 total)
with custom programming
Should be *without*
January 15, 2008 at 2:39 pm
When you export data via SSMS, you have the option to choose a text qualifier. I believe the default is the double quote. All this does is wrap all...
January 15, 2008 at 2:38 pm
Adam... just so you know, that function doesn't actually work... it returns a zero for positive numbers AND returns a "domain error" if @NBR happens to be a zero...
DECLARE @NBR...
January 15, 2008 at 1:06 pm
Can you restore a backup created a server running sql 2005 64 bit to a to a server running sql 2005 32 bit?
Yes. There is no problem in...
January 14, 2008 at 9:00 pm
I'll just bet the phantom proc is stored in the Master database
Agreed.
I have exhausted every other solution. The only place the stored procedure can be and still...
January 14, 2008 at 8:56 pm
In SQL 2005 the best way is to ,take the database offline, then move the respective data/log files to desired location, then update the new location of the database...
January 14, 2008 at 8:45 pm
This one is better as it does not use the depreciated sys.logins but uses the new DMVs.
EXEC master..sp_MSForeachdb '
USE [?]
DECLARE @username AS VARCHAR(25), @Counter INT, @NbrLogins INT
SET @Counter = 1
SET...
January 14, 2008 at 4:47 pm
Ok here is the script. I would highely recommend that you put a filter on the where clause, so you do not grab system accounts or built-in accounts. ...
January 14, 2008 at 4:25 pm
Make sure you have the right database selected in the drop down. If you have the correct database highlighted when you open the file; SSMS will default the connection...
January 14, 2008 at 3:31 pm
Double click on the .sql file. This will open the file in SSMS then all you have to do is click the execute button 😉
January 14, 2008 at 3:30 pm
I finally got around to testing it with a test db. I have tested the above code and it is wokring as intended.
January 14, 2008 at 3:13 pm
This final bit of code should work for you. Note that you will want to make sure the user is in the database first. Your final code will...
January 14, 2008 at 3:12 pm
Its because the set is outside the execution of the loop move the set = username in the loop.
EXEC master..sp_MSForeachdb '
USE [?]
DECLARE @username AS VARCHAR(25)
SET @username = ''test''
IF ''?'' <>...
January 14, 2008 at 3:00 pm
declare @username as varchar(100)
declare @runcommand as varchar(100)
SET @username = 'test'
EXEC master..sp_MSForeachdb '
USE [?]
IF ''?'' <> ''master'' AND ''?'' <> ''model'' AND ''?'' <> ''msdb'' AND ''?'' <> ''tempdb''
BEGIN
EXEC sp_addrolemember N''db_datareader'',...
January 14, 2008 at 1:29 pm
Viewing 15 posts - 811 through 825 (of 1,156 total)