Viewing 15 posts - 3,211 through 3,225 (of 13,469 total)
ahh, i see it now;
objectname is fine for objects, like tables/procs(anything that exists in sys.objects), but you need a different field in the xml data for the database name
CREATE TRIGGER...
June 27, 2013 at 7:13 am
you had most of it, it looks like, but you forgot to handle the EVENTDATA() function, which ahs the currently scoped event information
CREATE TRIGGER Prevent_DB_Drop
ON ALL SERVER
FOR DROP_DATABASE
AS...
June 27, 2013 at 5:27 am
if it's a single 8 gig table, BCP is going to be a better option.
you'll need to create the table DDL on the Target server(as a new name) Like TableName_Imported...
June 27, 2013 at 5:13 am
i did get it working on my own;
If you've installed the 64 bit drivers, and also set these two properties on the drivers:
--Required settings for the provider to work correctly...
June 27, 2013 at 5:06 am
on line 7 there's a space inside "Purchasing _v_Line_Item_e" between "Purchasing" and "_v_Line_Item_e", resulting a double alias.
if the tablename has a space, it needs to be bracketed: [Purchasing _v_Line_Item_e]
otherwise...
June 26, 2013 at 2:15 pm
drew how about using patindex to find the first [0-9] match?
this gets us kinda close, i think, except for that "10 SERIES BP MIS MONITOR"
select
patindex('%[0-9]%',drugname )...
June 26, 2013 at 1:46 pm
we can probably help, but not without providing some DDL and sample data that represents the structure and data we need to look at;
if you can convert "customerID, transactionid, transactiontime,...
June 26, 2013 at 11:10 am
do you mean how do you get teh newly created PK values for data you inserted? especially so you can then do a subsequent insert into a child table?
the answer...
June 26, 2013 at 9:40 am
yep that's exactly correct. you end up doing a GRANT INSERT ON dbo.ServerLogonHistory TO public in the AuditDb; that way your trigger does not run into permissions issues when...
June 26, 2013 at 8:50 am
the absolute best way is via a programming language.
you'd need to first establish some sort of relationship to the data...that is, you know that C:\AutoCad\drawing_424.tif
is related to a specific record...
June 26, 2013 at 8:47 am
you'll run into permissions problems accessing, say 10 databases in a single query;
the calling user would need at least read permissions in every single database for the specific table(s) involved..
i...
June 26, 2013 at 8:29 am
kapil_kk (6/26/2013)
But Lowell when we do a backup and restore on another server then I faced problems related to collations. what to do in this scenario?
collation differences can be a...
June 26, 2013 at 8:03 am
can you change this:
EXEC(@finalquery)
to this, and paste the results after running the procedure?
PRINT @finalquery
EXEC(@finalquery)
also, is there any reason you are rrunning it twice in the same proc?
EXEC(@finalquery)
EXEC sp_executesql @finalquery
June 26, 2013 at 7:53 am
wak_no1 (6/26/2013)
If I run the SP unaltered, it outputs a neat looking script, is there no way I can simply backup the output, without having to amend the SP and...
June 26, 2013 at 7:46 am
also, this looks incorrect to me, there's commas, double commas but no values:
'AND (@Part_Type_MP = ,, OR (CHARINDEX(, + CAST(P.Part_Type as VARCHAR(50)) + ,, @Part_Type_MP) >0))'
is it the single quotes...
June 26, 2013 at 7:38 am
Viewing 15 posts - 3,211 through 3,225 (of 13,469 total)