Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / April 2008

Tip: Looking for answers? Try searching our database.

write SP before target database is created

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
thejamie - 30 Apr 2008 12:54 GMT
I think there is an option that will allow you to write a stored procedure
that loads data on a server that is not yet created (server created but not
the database).   This would be for used for transfering data from one
existing object to another not yet created.

Is there an option for this?
Signature

Regards,
Jamie

Dan Guzman - 30 Apr 2008 13:07 GMT
Due to deferred name resolution, you can create a stored procedure even if
tables referenced by the stored procedure don't exist.

CREATE PROCEDURE dbo.TransferData
AS
SELECT *
INTO FutureDatabase.dbo.TargetTable
FROM dbo.SourceTable
GO

Signature

Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

>I think there is an option that will allow you to write a stored procedure
> that loads data on a server that is not yet created (server created but
[quoted text clipped - 3 lines]
>
> Is there an option for this?
thejamie - 30 Apr 2008 13:48 GMT
Is there a requirement that the compatibility mode be 9 and not 8?
Signature

Regards,
Jamie

> Due to deferred name resolution, you can create a stored procedure even if
> tables referenced by the stored procedure don't exist.
[quoted text clipped - 13 lines]
> >
> > Is there an option for this?
Tibor Karaszi - 30 Apr 2008 15:56 GMT
This should work regardless of compatibility level.

Signature

Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

> Is there a requirement that the compatibility mode be 9 and not 8?
>
[quoted text clipped - 15 lines]
>> >
>> > Is there an option for this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.