Click here to Skip to main content
14,866,697 members
Home / Discussions / Database
   

Database

 
GeneralRe: Single row for multiple results Pin
_Zorro_25-Jul-11 6:20
professional_Zorro_25-Jul-11 6:20 
GeneralRe: Single row for multiple results Pin
smcnulty200025-Jul-11 13:04
Membersmcnulty200025-Jul-11 13:04 
AnswerRe: Single row for multiple results Pin
S Douglas11-Aug-11 9:33
professionalS Douglas11-Aug-11 9:33 
QuestionData on one server, structure on another [modified] Pin
_Zorro_22-Jul-11 0:42
professional_Zorro_22-Jul-11 0:42 
AnswerRe: Data on one server, structure on another Pin
Corporal Agarn22-Jul-11 3:02
professionalCorporal Agarn22-Jul-11 3:02 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 4:14
professional_Zorro_22-Jul-11 4:14 
GeneralRe: Data on one server, structure on another Pin
Corporal Agarn22-Jul-11 4:27
professionalCorporal Agarn22-Jul-11 4:27 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 4:50
professional_Zorro_22-Jul-11 4:50 
djj55 wrote:
If you try running a stored procedure that stores to the c:\ drive, see where
the file ends up.


Are you talking about Sql Server, or Windows Server? Checking the location of a file stored from a stored procedure makes me believe you are talking about the second one.

If you have an Sql Server that has two databases, db1 and db2, and you create a Stored Procedure only on db2, trying to run that stored procedure from db1 won't work.

Check the details of EXEC sp_who you'll see that the dbname is specified.

We too are referencing the schema, and we still use dbo too by the way.

I think that the only way would be prefixing all our table/views/etc. calls with the database name, the name should be a parameter (if we're running tests then the data should be retrieved from the test database, otherwise it should get the data from the context's database). If we use a parameter, then, that would mean converting all our procedures to dynamic sql. Considering that we almost have 3000 stored procedures, this is not an option, as said before.

I was wondering if Sql Server supported some sort of parameter, indicating that it should read the data from another database, while executing a procedure from another (without having to edit the stored procedures, this is a key factor).
GeneralRe: Data on one server, structure on another Pin
Corporal Agarn22-Jul-11 5:03
professionalCorporal Agarn22-Jul-11 5:03 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 5:17
professional_Zorro_22-Jul-11 5:17 
AnswerRe: Data on one server, structure on another Pin
smcnulty200022-Jul-11 20:58
Membersmcnulty200022-Jul-11 20:58 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 2:37
professional_Zorro_25-Jul-11 2:37 
GeneralRe: Data on one server, structure on another Pin
smcnulty200025-Jul-11 7:33
Membersmcnulty200025-Jul-11 7:33 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 22:22
professional_Zorro_25-Jul-11 22:22 
GeneralRe: Data on one server, structure on another Pin
smcnulty200025-Jul-11 8:16
Membersmcnulty200025-Jul-11 8:16 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 22:24
professional_Zorro_25-Jul-11 22:24 
AnswerRe: Data on one server, structure on another Pin
Mycroft Holmes22-Jul-11 21:24
professionalMycroft Holmes22-Jul-11 21:24 
GeneralRe: Data on one server, structure on another Pin
smcnulty200022-Jul-11 21:32
Membersmcnulty200022-Jul-11 21:32 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes23-Jul-11 0:03
professionalMycroft Holmes23-Jul-11 0:03 
GeneralRe: Data on one server, structure on another Pin
David Skelly24-Jul-11 22:36
MemberDavid Skelly24-Jul-11 22:36 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 2:45
professional_Zorro_25-Jul-11 2:45 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes25-Jul-11 12:13
professionalMycroft Holmes25-Jul-11 12:13 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 22:15
professional_Zorro_25-Jul-11 22:15 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes25-Jul-11 22:43
professionalMycroft Holmes25-Jul-11 22:43 
GeneralRe: Data on one server, structure on another Pin
_Zorro_26-Jul-11 1:53
professional_Zorro_26-Jul-11 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.