Click here to Skip to main content
14,775,570 members
Home » Discussions » Database
   

Database

 
GeneralRe: Single row for multiple results Pin
_Zorro_25-Jul-11 7:20
professional_Zorro_25-Jul-11 7:20 
GeneralRe: Single row for multiple results Pin
smcnulty200025-Jul-11 14:04
Membersmcnulty200025-Jul-11 14:04 
AnswerRe: Single row for multiple results Pin
S Douglas11-Aug-11 10:33
professionalS Douglas11-Aug-11 10:33 
QuestionData on one server, structure on another [modified] Pin
_Zorro_22-Jul-11 1:42
professional_Zorro_22-Jul-11 1:42 
AnswerRe: Data on one server, structure on another Pin
Corporal Agarn22-Jul-11 4:02
professionalCorporal Agarn22-Jul-11 4:02 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 5:14
professional_Zorro_22-Jul-11 5:14 
GeneralRe: Data on one server, structure on another Pin
Corporal Agarn22-Jul-11 5:27
professionalCorporal Agarn22-Jul-11 5:27 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 5:50
professional_Zorro_22-Jul-11 5: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 6:03
professionalCorporal Agarn22-Jul-11 6:03 
GeneralRe: Data on one server, structure on another Pin
_Zorro_22-Jul-11 6:17
professional_Zorro_22-Jul-11 6:17 
AnswerRe: Data on one server, structure on another Pin
smcnulty200022-Jul-11 21:58
Membersmcnulty200022-Jul-11 21:58 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 3:37
professional_Zorro_25-Jul-11 3:37 
GeneralRe: Data on one server, structure on another Pin
smcnulty200025-Jul-11 8:33
Membersmcnulty200025-Jul-11 8:33 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 23:22
professional_Zorro_25-Jul-11 23:22 
GeneralRe: Data on one server, structure on another Pin
smcnulty200025-Jul-11 9:16
Membersmcnulty200025-Jul-11 9:16 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 23:24
professional_Zorro_25-Jul-11 23:24 
AnswerRe: Data on one server, structure on another Pin
Mycroft Holmes22-Jul-11 22:24
professionalMycroft Holmes22-Jul-11 22:24 
GeneralRe: Data on one server, structure on another Pin
smcnulty200022-Jul-11 22:32
Membersmcnulty200022-Jul-11 22:32 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes23-Jul-11 1:03
professionalMycroft Holmes23-Jul-11 1:03 
GeneralRe: Data on one server, structure on another Pin
David Skelly24-Jul-11 23:36
MemberDavid Skelly24-Jul-11 23:36 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 3:45
professional_Zorro_25-Jul-11 3:45 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes25-Jul-11 13:13
professionalMycroft Holmes25-Jul-11 13:13 
GeneralRe: Data on one server, structure on another Pin
_Zorro_25-Jul-11 23:15
professional_Zorro_25-Jul-11 23:15 
GeneralRe: Data on one server, structure on another Pin
Mycroft Holmes25-Jul-11 23:43
professionalMycroft Holmes25-Jul-11 23:43 
GeneralRe: Data on one server, structure on another Pin
_Zorro_26-Jul-11 2:53
professional_Zorro_26-Jul-11 2: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.