Click here to Skip to main content
14,878,506 members
Home / Discussions / Database
   

Database

 
GeneralRe: Single row for multiple results Pin
vanikanc22-Jul-11 8:27
Membervanikanc22-Jul-11 8:27 
GeneralRe: Single row for multiple results Pin
Blue_Boy22-Jul-11 8:28
MemberBlue_Boy22-Jul-11 8:28 
AnswerRe: Single row for multiple results Pin
Tim Carmichael22-Jul-11 8:28
MemberTim Carmichael22-Jul-11 8:28 
GeneralRe: Single row for multiple results Pin
vanikanc22-Jul-11 8:42
Membervanikanc22-Jul-11 8:42 
AnswerRe: Single row for multiple results Pin
Shameel22-Jul-11 9:00
professionalShameel22-Jul-11 9:00 
AnswerRe: Single row for multiple results Pin
PIEBALDconsult23-Jul-11 14:07
professionalPIEBALDconsult23-Jul-11 14:07 
AnswerRe: Single row for multiple results Pin
Niladri_Biswas24-Jul-11 22:37
MemberNiladri_Biswas24-Jul-11 22:37 
SuggestionRe: Single row for multiple results Pin
_Zorro_25-Jul-11 4:22
professional_Zorro_25-Jul-11 4:22 
GeneralRe: Single row for multiple results Pin
vanikanc25-Jul-11 5:22
Membervanikanc25-Jul-11 5:22 
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 

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.