Showing posts with label stored. Show all posts
Showing posts with label stored. Show all posts

Wednesday, March 28, 2012

Mirror Status

Are there Stored Procedures or tables that will tell me which of the mirrore
d
servers is active ?Is this a database mirroring question? Mirroring is at the database level.
Try
select * from sys.database_mirroring
and look for mirroring_role and mirroring_role_desc. They should say
PRINCIPAL or MIRROR.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"PJU" wrote:

> Are there Stored Procedures or tables that will tell me which of the mirro
red
> servers is active ?
>

Mirror Status

Are there Stored Procedures or tables that will tell me which of the mirrored
servers is active ?Is this a database mirroring question? Mirroring is at the database level.
Try
select * from sys.database_mirroring
and look for mirroring_role and mirroring_role_desc. They should say
PRINCIPAL or MIRROR.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"PJU" wrote:
> Are there Stored Procedures or tables that will tell me which of the mirrored
> servers is active ?
>

Monday, March 26, 2012

Mirror a view to a table

I would like to replicate a single view to a table that is stored on another db server (connected as linked server object).
Is there a way to imitate the behavior of a trigger (insert, delete, update) for a view?
I could assign the triggers to the table that provides the primary key.
So I could handle insert, delete events.
But what about updates that affect row in other tables that are used in this view?

Code Snippet

CREATE TRIGGER mirror_tableA_insert
ON [TESTDB].[dbo].[tableA]
FOR INSERT
AS
BEGIN
set nocount on
SET XACT_ABORT ON
set REMOTE_PROC_TRANSACTIONS off
INSERT INTO OPENQUERY(TESTLINKED, 'SELECT * FROM tableA')

SELECT *
FROM [TESTDB].[dbo].[myView] orig
INNER JOIN inserted i
ON i.prim = orig.prim

END

Thanks in advance for any hints!

Marcus

Use replication service instead of using the Trigger.

|||

It is not totally clear what you are attempting to accomplish.

Why are you using OPENQUERY instead of a LinkedServer?

And you may be better served by exploring an 'INSTEAD OF' TRIGGER.

|||

Arnie Rowland wrote:


It is not totally clear what you are attempting to accomplish.
Why are you using OPENQUERY instead of a LinkedServer?
And you may be better served by exploring an 'INSTEAD OF' TRIGGER.

I would like to replicate this view to a MySQL database that is used for a website.

Basically it's data synchronization job. So all dml statements that affect this view should trigger a procedure that synchronizes the MySQL table with the view on the SQLServer.


Yes I managed to set up a linked server for the MySQL DB through the MyODBC 3.51 driver.
First I tried to copy all the rows in this view to a MySQL table using a INSERT INTO OPENQUERY statement.

But a trigger can't be added to a view.

Manivannan.D.Sekaran wrote:

Use replication service instead of using the Trigger.


Yes the replication service would be the way to go when the target server (subscriber) would be a DB2 or Oracle database. But my target datatbase is MySQL (using it for a website).
Maybe it's possible to define this OLE DB data source as subscriber?

|||

You can't do directly, but there are some thrid party tools available. C-JDBC: Clustered JDBC is one of the tool.(http://c-jdbc.objectweb.org/)

|||

Marc Cicero wrote:

But a trigger can't be added to a view.

As I wrote earlier, you may wish to explore an INSTEAD OF TRIGGER.

An INSTEAD OF TRIGGER can work on a VIEW.

Miningmodel-Viewer: Parser Error

Parser for XMLA (XML for Analysis): Timeout geting XMLA-Request (XML for Analysis).
Error when executing the administrated stored procedure 'GetItemsets': Exception has been thrown by the target of an invocation.Microsoft::AnalysisServices::AdomdServer::AdomdException.

I get this Error in Miningmodel-Viewer, what to do? This occurs when I set the MAXIMUM_ITEMSET_COUNT to 1,500,000 .

The same problem was solved in thread "Lift chart - Time out error SSAS data minign 2005 "

Monday, March 12, 2012

milliseconds in query analyzer

I'm attempting to optomize my stored procedures by attempting different join
orders and indexes. I'd like to know if there is a way to see milliseconds i
n
the query analyezr? (or elsewhere)
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kesTry using the profiler to run a trace, and it will give you milleseconds.
Archer
"WebBuilder451" wrote:

> I'm attempting to optomize my stored procedures by attempting different jo
in
> orders and indexes. I'd like to know if there is a way to see milliseconds
in
> the query analyezr? (or elsewhere)
> thanks
> kes
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes|||I see milliseconds just fine:
SELECT GETDATE()
-- code here
WAITFOR DELAY '00:00:01.6'
SELECT GETDATE()
Maybe you could be more specific?
"WebBuilder451" <WebBuilder451@.discussions.microsoft.com> wrote in message
news:C062B7BA-C54E-480C-9B2B-C2FA80F4CBD0@.microsoft.com...
> I'm attempting to optomize my stored procedures by attempting different
> join
> orders and indexes. I'd like to know if there is a way to see milliseconds
> in
> the query analyezr? (or elsewhere)
> thanks
> kes
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes|||where are you seeing the miliseconds? I see only seconds at the bottom. I'll
try to be more specific. Using the tool that ships with mssqlserver called
"SQL Query Analyzer" I create a query and run it. This produces out put and
this process takes a messureable amount of time. This time currently only
displays in seconds. I would like to know if it's possible to see this
displayed in milliseconds? I can create an artifical timer that will produce
a time difference, however, i would perfer not to introduce unnecessary
elements in queries to be analyized.
thnaks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Aaron Bertrand [SQL Server MVP]" wrote:

> I see milliseconds just fine:
> SELECT GETDATE()
> -- code here
> WAITFOR DELAY '00:00:01.6'
> SELECT GETDATE()
> Maybe you could be more specific?
>
> "WebBuilder451" <WebBuilder451@.discussions.microsoft.com> wrote in message
> news:C062B7BA-C54E-480C-9B2B-C2FA80F4CBD0@.microsoft.com...
>
>|||> where are you seeing the miliseconds? I see only seconds at the bottom.
> I'll
> try to be more specific. Using the tool that ships with mssqlserver called
> "SQL Query Analyzer" I create a query and run it. This produces out put
> and
> this process takes a messureable amount of time. This time currently only
> displays in seconds.
Yes, I know what Query Analyzer is. Is there a way you can take a screen
shot, post it somewhere, and send the URL?|||On Mon, 12 Sep 2005 10:40:05 -0700, "WebBuilder451"
<WebBuilder451@.discussions.microsoft.com> wrote:
>I'm attempting to optomize my stored procedures by attempting different joi
n
>orders and indexes. I'd like to know if there is a way to see milliseconds
in
>the query analyezr? (or elsewhere)
Run it ten times?
J.|||thanks,
that's an answer.
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"bagman3rd" wrote:
> Try using the profiler to run a trace, and it will give you milleseconds.
> Archer
> "WebBuilder451" wrote:
>|||I guess then the answer is "No there is no setting in the program that
changes the display"
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"jxstern" wrote:

> On Mon, 12 Sep 2005 10:40:05 -0700, "WebBuilder451"
> <WebBuilder451@.discussions.microsoft.com> wrote:
> Run it ten times?
> J.
>|||I guess then the answer is "No there is no setting in the program that
changes the display"
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Aaron Bertrand [SQL Server MVP]" wrote:

> Yes, I know what Query Analyzer is. Is there a way you can take a screen
> shot, post it somewhere, and send the URL?
>
>|||>I guess then the answer is "No there is no setting in the program that
> changes the display"
No, but if I can understand how exactly you're USING Query Analyzer in such
a way that SELECT GETDATE() does not yield milliseconds, I might be able to
answer more constructively.

mildly complex query. need senior dba advise.

Hi there,
I have this stored procedure I am trying to optimize:
CREATE PROCEDURE uspLeaderboardStateResults
@.StateID int
AS
BEGIN
CREATE TABLE #ResultsOutput (
rowID int not null identity(1,1),
Rank int,
MemberID int,
MemberCode varchar(50),
State varchar(5),
MemberName varchar(510),
StateID int,
TotalScore int,
TotalEvents int,
PRIMARY KEY (TotalScore, MemberID, rowID),
UNIQUE(TotalScore, MemberID, rowID)
)
CREATE TABLE #TotalScoreCount (
rowID int not null identity(1,1),
TotalScore int,
TotalScoreCount int
PRIMARY KEY (TotalScoreCount, TotalScore, rowID),
UNIQUE (TotalScoreCount, TotalScore, rowID)
)
INSERT INTO #ResultsOutput
SELECT 0, --rank. gets updated later.
Results.MemberID,
Members.MemberCode,
Members.State,
Members.FirstName + ' ' + Members.Surname,
State.StateID,
SUM(Results.Score) AS TotalScore,
COUNT(Results.ResultsID) AS TotalEvents
FROM Members
INNER JOIN Results ON Members.MemberID = Results.MemberID
INNER JOIN Event ON Results.EventID = Event.EventID
INNER JOIN Venue ON Event.VenueID = Venue.VenueID
INNER JOIN Region ON Venue.RegionID = Region.RegionID
INNER JOIN State ON Region.StateID = State.StateID
WHERE Results.Valid = 1 AND Event.EventType = 0 AND State.StateID =
@.StateID
GROUP BY Results.MemberID,
Members.MemberCode,
Members.State,
Members.FirstName,
Members.Surname,
State.StateID
ORDER BY TotalScore DESC, Results.MemberID ASC
INSERT INTO #TotalScoreCount
SELECT TotalScore,
COUNT(TotalScore) AS TotalScoreCount
FROM #ResultsOutput
GROUP BY TotalScore
ORDER BY TotalScore DESC
UPDATE #ResultsOutput
SET Rank = (SELECT ISNULL(SUM(TSC.TotalScoreCount), 0) FROM
#TotalScoreCount TSC WHERE TSC.TotalScore > RO.TotalScore) + 1
FROM #ResultsOutput RO
SELECT * FROM #ResultsOutput ORDER BY TotalScore DESC, MemberID ASC
DROP table #ResultsOutput
DROP table #TotalScoreCount
END
I did a SQL Execution plan and saw no table scans on my selects/updates
(Only on my inserts ofcourse)
The query still runs poorly it takes up to 7 seconds to run!
Members has 44621 rows
Results has 121158
Venue has 336
Event has 3298
Region has 58
I am quite new and poor at SQL so any help would be appreciated.
Thanks!to be perfectly honest... its not 'that' bad already.
You could try using table variable (sql2k +) instead of temp table and also
remove the order by on the insert as you are ordering the select after
anyway.
<robert@.relate.com.au> wrote in message
news:1147350229.650320.155550@.g10g2000cwb.googlegroups.com...
> Hi there,
> I have this stored procedure I am trying to optimize:
>
> CREATE PROCEDURE uspLeaderboardStateResults
> @.StateID int
> AS
> BEGIN
> CREATE TABLE #ResultsOutput (
> rowID int not null identity(1,1),
> Rank int,
> MemberID int,
> MemberCode varchar(50),
> State varchar(5),
> MemberName varchar(510),
> StateID int,
> TotalScore int,
> TotalEvents int,
> PRIMARY KEY (TotalScore, MemberID, rowID),
> UNIQUE(TotalScore, MemberID, rowID)
> )
> CREATE TABLE #TotalScoreCount (
> rowID int not null identity(1,1),
> TotalScore int,
> TotalScoreCount int
> PRIMARY KEY (TotalScoreCount, TotalScore, rowID),
> UNIQUE (TotalScoreCount, TotalScore, rowID)
> )
>
> INSERT INTO #ResultsOutput
> SELECT 0, --rank. gets updated later.
> Results.MemberID,
> Members.MemberCode,
> Members.State,
> Members.FirstName + ' ' + Members.Surname,
> State.StateID,
> SUM(Results.Score) AS TotalScore,
> COUNT(Results.ResultsID) AS TotalEvents
> FROM Members
> INNER JOIN Results ON Members.MemberID = Results.MemberID
> INNER JOIN Event ON Results.EventID = Event.EventID
> INNER JOIN Venue ON Event.VenueID = Venue.VenueID
> INNER JOIN Region ON Venue.RegionID = Region.RegionID
> INNER JOIN State ON Region.StateID = State.StateID
> WHERE Results.Valid = 1 AND Event.EventType = 0 AND State.StateID =
> @.StateID
> GROUP BY Results.MemberID,
> Members.MemberCode,
> Members.State,
> Members.FirstName,
> Members.Surname,
> State.StateID
> ORDER BY TotalScore DESC, Results.MemberID ASC
>
> INSERT INTO #TotalScoreCount
> SELECT TotalScore,
> COUNT(TotalScore) AS TotalScoreCount
> FROM #ResultsOutput
> GROUP BY TotalScore
> ORDER BY TotalScore DESC
> UPDATE #ResultsOutput
> SET Rank = (SELECT ISNULL(SUM(TSC.TotalScoreCount), 0) FROM
> #TotalScoreCount TSC WHERE TSC.TotalScore > RO.TotalScore) + 1
> FROM #ResultsOutput RO
>
> SELECT * FROM #ResultsOutput ORDER BY TotalScore DESC, MemberID ASC
> DROP table #ResultsOutput
> DROP table #TotalScoreCount
> END
>
> I did a SQL Execution plan and saw no table scans on my selects/updates
> (Only on my inserts ofcourse)
> The query still runs poorly it takes up to 7 seconds to run!
> Members has 44621 rows
> Results has 121158
> Venue has 336
> Event has 3298
> Region has 58
> I am quite new and poor at SQL so any help would be appreciated.
> Thanks!
>|||Well, 7 seconds is hardly poor.
Anyway, make sure you have the following indexes:
- on Members(MemberID)
- on Results(EventID, MemberID, Valid)
- on Results(MemberID, EventID, Valid)
- on Event(EventID, VenueID, EventType)
- on Event(VenueID, EventID, EventType)
- on Venue(VenueID, RegionID)
- on Venue(RegionID, VenueID)
- on Region(RegionID, StateID)
- on Region(StateID, RegionID)
- on State(StateID)
and then try the SP below. Of course, you can remove the indexes that
you created above if they are not used in the query below.
CREATE PROCEDURE uspLeaderboardStateResults
@.StateID int
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #ResultsOutput
(MemberID int
,MemberCode varchar(50)
,State varchar(5)
,MemberName varchar(510)
,StateID int
,TotalScore int
,TotalEvents int
)
INSERT INTO #ResultsOutput (MemberID, MemberCode, State, MemberName,
StateID, TotalScore, TotalEvents)
SELECT Results.MemberID
, MAX(Members.MemberCode)
, MAX(Members.State)
, MAX(Members.FirstName + ' ' + Members.Surname)
, MAX(State.StateID)
, SUM(Results.Score)
, COUNT(Results.ResultsID)
FROM Members
INNER JOIN Results ON Results.MemberID = Members.MemberID
INNER JOIN Event ON Event.EventID = Results.EventID
INNER JOIN Venue ON Venue.VenueID = Event.VenueID
INNER JOIN Region ON Region.RegionID = Venue.RegionID
INNER JOIN State ON State.StateID = Region.StateID
WHERE Results.Valid = 1
AND Event.EventType = 0
AND State.StateID = @.StateID
GROUP BY Results.MemberID
Declare @.SQL varchar(1000)
Set @.SQL='CREATE NONCLUSTERED INDEX IX_ResultOutput_spid'+CAST(@.@.spid
as varchar(12))+' ON #ResultsOutput(TotalScore)'
EXEC (@.SQL)
SELECT
ISNULL((
SELECT COUNT(*)
FROM #ResultsOutput R2
WHERE R2.TotalScore > R1.TotalScore
),0)+1 AS Rank
,MemberID
,MemberCode
,State
,MemberName
,StateID
,TotalScore
,TotalEvents
FROM #ResultsOutput R1
ORDER BY TotalScore DESC, MemberID ASC
DROP TABLE #ResultsOutput
END
Hope this helps,
Gert-Jan
"robert@.relate.com.au" wrote:
> Hi there,
> I have this stored procedure I am trying to optimize:
> CREATE PROCEDURE uspLeaderboardStateResults
> @.StateID int
> AS
> BEGIN
> CREATE TABLE #ResultsOutput (
> rowID int not null identity(1,1),
> Rank int,
> MemberID int,
> MemberCode varchar(50),
> State varchar(5),
> MemberName varchar(510),
> StateID int,
> TotalScore int,
> TotalEvents int,
> PRIMARY KEY (TotalScore, MemberID, rowID),
> UNIQUE(TotalScore, MemberID, rowID)
> )
> CREATE TABLE #TotalScoreCount (
> rowID int not null identity(1,1),
> TotalScore int,
> TotalScoreCount int
> PRIMARY KEY (TotalScoreCount, TotalScore, rowID),
> UNIQUE (TotalScoreCount, TotalScore, rowID)
> )
> INSERT INTO #ResultsOutput
> SELECT 0, --rank. gets updated later.
> Results.MemberID,
> Members.MemberCode,
> Members.State,
> Members.FirstName + ' ' + Members.Surname,
> State.StateID,
> SUM(Results.Score) AS TotalScore,
> COUNT(Results.ResultsID) AS TotalEvents
> FROM Members
> INNER JOIN Results ON Members.MemberID = R
esults.MemberID
> INNER JOIN Event ON Results.EventI
D = Event.EventID
> INNER JOIN Venue ON Event.
VenueID = Venue.VenueID
> INNER JOIN Region
ON Venue.RegionID = Region.RegionID
> INNER JOIN
State ON Region.StateID = State.StateID
> WHERE Results.Valid = 1 AND Event.EventType = 0
AND State.StateID =
> @.StateID
> GROUP BY Results.MemberID,
> Members.MemberCode,
> Members.State,
> Members.FirstName,
> Members.Surname,
> State.StateID
> ORDER BY TotalScore DESC, Results.MemberID ASC
> INSERT INTO #TotalScoreCount
> SELECT TotalScore,
> COUNT(TotalScore) AS TotalScoreCount
> FROM #ResultsOutput
> GROUP BY TotalScore
> ORDER BY TotalScore DESC
> UPDATE #ResultsOutput
> SET Rank = (SELECT ISNULL(SUM(TSC.TotalScoreCount), 0) FRO
M
> #TotalScoreCount TSC WHERE TSC.TotalScore > RO.TotalScore) + 1
> FROM #ResultsOutput RO
> SELECT * FROM #ResultsOutput ORDER BY TotalScore DESC, MemberID AS
C
> DROP table #ResultsOutput
> DROP table #TotalScoreCount
> END
> I did a SQL Execution plan and saw no table scans on my selects/updates
> (Only on my inserts ofcourse)
> The query still runs poorly it takes up to 7 seconds to run!
> Members has 44621 rows
> Results has 121158
> Venue has 336
> Event has 3298
> Region has 58
> I am quite new and poor at SQL so any help would be appreciated.
> Thanks!|||Try moving the filters from the where clause because they get applied
after building the set of rows from the JOIN statements. Also, the
JOIN to States doesn't appear to be needed because the StateID can be
filltered directly from Results.
This may be faster:
INSERT INTO #ResultsOutput
SELECT 0, --rank. gets updated later.
Results.MemberID,
Members.MemberCode,
Members.State,
Members.FirstName + ' ' +
Members.Surname,
State.StateID,
SUM(Results.Score) AS TotalScore,
COUNT(Results.ResultsID) AS TotalEvents
FROM Members
INNER JOIN Results ON Members.MemberID =
Results.MemberID AND Results.Valid = 1
INNER JOIN Event ON Results.EventID = Event.EventID AND
Event.EventType = 0
INNER JOIN Venue ON Event.VenueID = Venue.VenueID
INNER JOIN Region ON Venue.RegionID = Region.RegionID
AND Region.StateID = @.StateID
GROUP BY Results.MemberID,
Members.MemberCode,
Members.State,
Members.FirstName,
Members.Surname,
State.StateID|||On Thu, 11 May 2006 20:56:02 +0200, Gert-Jan Strik wrote:

> Declare @.SQL varchar(1000)
> Set @.SQL='CREATE NONCLUSTERED INDEX IX_ResultOutput_spid'+CAST(@.@.spid
>as varchar(12))+' ON #ResultsOutput(TotalScore)'
> EXEC (@.SQL)
Hi Gert-Jan,
Why are you addind the spid to the index name here? I have always been
under the assumption that you only have to prefix indexes on temp tables
with the # symbol, just like you do with temp tables.
In fact, I just tested this. I executed the code below from two
different connections in SSMS and didn't get an error:
create table #test (a int)
go
create nonclustered index #ind on #test(a)
go
Hugo Kornelis, SQL Server MVP|||Thanks for the tip. It was about time that I learnt something new :-)
Gert-Jan
Hugo Kornelis wrote:
> On Thu, 11 May 2006 20:56:02 +0200, Gert-Jan Strik wrote:
>
> Hi Gert-Jan,
> Why are you addind the spid to the index name here? I have always been
> under the assumption that you only have to prefix indexes on temp tables
> with the # symbol, just like you do with temp tables.
> In fact, I just tested this. I executed the code below from two
> different connections in SSMS and didn't get an error:
> create table #test (a int)
> go
> create nonclustered index #ind on #test(a)
> go
> --
> Hugo Kornelis, SQL Server MVP|||Thanks for everyone's help everyone. Immy, i originally was using table
variables but was gettign table scans because of lack of indexing.
I guess i'm going to have to setup a scheduled task to run a stored
proc that will run every half an hour to do that 1 query and select it
all into a table with every field in one row and already sorted, that
way when my website application goes to run it only has to do a simple
select.
Thanks again all for confirming nothings majorly wrong.

Friday, March 9, 2012

Migration to Yukon

Hi,

Anyone kindly let me know more and clear details about the below 2 statements

1.Remove reference to undocumented system tables/stored procs

2. Remove statements modifying system objects

as are not supported in SQL Server 2005. while migrating from sql server 2000 to YUkon (sql server 2005) the above 2 points need to be taken care. but no much clarity on the above.

kindly help me

Regards

Crish

Hi,

not sure above the first one, which procedure are deprecated but the latter one had some major chnages. The system objects are now in the sys schema,e.g. changing the sysobjects to sys.objects. if you used INFORMATION_SCHEMA views before you don′t need to change anything, because the views were also modified to reflect the changes, if you use direct access to the system tables, you have to change your code.

HTH, Jens SUessmeyer.


http://www.sqlserver2005.de

|||Thanks much for the information Jens.

Migration of SQL Server 2000 db to Oracle 9i

Hi,
Can anyone let me know of a tool which shall migrate the entire SQL Server
2000 database to Oracle 9i along with all the stored procedures . Someone in
the net has posted that a tool comes with the Oracle 9i software .
Any help would be appreciated .
Thanks ,
Sujay
Sujay Ghosh
Bangalore, INDIA
Email : sujayg_mfc@.yahoo.com
Mobile : 9845467789
Such migrations are difficult, since the two systems don't port well to
each. Why are you migrating to Oracle? SQL Server performs just as well,
is easier to use and costs less.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
Hi,
Can anyone let me know of a tool which shall migrate the entire SQL Server
2000 database to Oracle 9i along with all the stored procedures . Someone
in
the net has posted that a tool comes with the Oracle 9i software .
Any help would be appreciated .
Thanks ,
Sujay
Sujay Ghosh
Bangalore, INDIA
Email : sujayg_mfc@.yahoo.com
Mobile : 9845467789
|||Hi Tom ,
I am working on a product which shall support both SQL Server 2000 and
Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
am working on the same product with the back end as Oracle 9i to test the
app, I need to do the migration , because there are some changes in Oracle
stored procedures which are not similar to that of SQL Server 2000 .
Please let me know how can it be solved .
Thanks ,
Sujay
"Tom Moreau" wrote:

> Such migrations are difficult, since the two systems don't port well to
> each. Why are you migrating to Oracle? SQL Server performs just as well,
> is easier to use and costs less.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> ..
> "Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
> news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
> Hi,
> Can anyone let me know of a tool which shall migrate the entire SQL Server
> 2000 database to Oracle 9i along with all the stored procedures . Someone
> in
> the net has posted that a tool comes with the Oracle 9i software .
> Any help would be appreciated .
> Thanks ,
> Sujay
> --
> Sujay Ghosh
> Bangalore, INDIA
> Email : sujayg_mfc@.yahoo.com
> Mobile : 9845467789
>
|||Well, it won't be easy. Oracle's dialect of SQL is not the same as SQL
Server's. For example, where you would use DECODE in Oracle, you'd use CASE
in SQL Server. FWIW, MS is coming out with a migration tool to go from
Oracle to SQL Server but not the other way.
Good luck.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
news:87EED46A-8510-4F71-A7C9-8107B7390532@.microsoft.com...
Hi Tom ,
I am working on a product which shall support both SQL Server 2000 and
Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
am working on the same product with the back end as Oracle 9i to test the
app, I need to do the migration , because there are some changes in Oracle
stored procedures which are not similar to that of SQL Server 2000 .
Please let me know how can it be solved .
Thanks ,
Sujay
"Tom Moreau" wrote:

> Such migrations are difficult, since the two systems don't port well to
> each. Why are you migrating to Oracle? SQL Server performs just as well,
> is easier to use and costs less.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> ..
> "Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
> news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
> Hi,
> Can anyone let me know of a tool which shall migrate the entire SQL
> Server
> 2000 database to Oracle 9i along with all the stored procedures . Someone
> in
> the net has posted that a tool comes with the Oracle 9i software .
> Any help would be appreciated .
> Thanks ,
> Sujay
> --
> Sujay Ghosh
> Bangalore, INDIA
> Email : sujayg_mfc@.yahoo.com
> Mobile : 9845467789
>
|||The tool that was mentioned could have been Oracle Migration
Workbench. It doesn't always work too well and the code that
is generated is a bit of a mess.
But you can find info and a download link at:
http://www.oracle.com/technology/tec...nch/index.html
-Sue
On Sun, 13 Mar 2005 01:35:03 -0800, "Sujay Ghosh"
<sujayg_mfc@.yahoo.com> wrote:
[vbcol=seagreen]
>Hi Tom ,
> I am working on a product which shall support both SQL Server 2000 and
>Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
>am working on the same product with the back end as Oracle 9i to test the
>app, I need to do the migration , because there are some changes in Oracle
>stored procedures which are not similar to that of SQL Server 2000 .
> Please let me know how can it be solved .
> Thanks ,
>Sujay
>
>"Tom Moreau" wrote:

Migration of Extended Stored Procedure

Hi ,

Any Body can help in knowing, How i can migrate the Extended Stored Procedure from one server to another.

Hi,

sure you can simply copy the dll which contains the logic for the xp to the new server in the BINN directory and run the command:

exec sp_addextendedproc 'xp_proc_Name', 'xplibrary.dll'

That′s it.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Wednesday, March 7, 2012

Migration from Sybase to SQL 2000 problems

Hello,
I'm having a problem migrating a particular stored Procedure wich runs
nested and interdependent Fetching from temporary tables.
There is a main cursor and from that, a var is retrieved for use as a
parameter for other cursors. The most important is that the Cursor's queryes
all run successfully independently and with the parameters filled in.
//main cursor
declare CritSelAgr cursor for
select CodCritSelec, TodosSectInst, TodosPrzContr, TodosPais,
TodosMoeda, Coeficiente
from P_TRMCCSE0
where MRCUIC = @.PCodRub and
MRCUKN = @.PVersRub
order by CodCritSelec
for read only
select @.ErroSql = @.@.error
if @.ErroSql <> 0
begin
exec PCRMZZZZ0itratamsg @.ErroSql
return @.ErroSql
end
//dependent cursor *uses CodCritSelec from the main cursor
declare CritInstrFin cursor for
select CodInstrFin, CIF.CodTpConta, DescTpConta
from P_TRMCCIF0 CIF,
VRMCTCO00 TCO
where MRCUIC = @.PCodRub and
MRCUKN = @.PVersRub and
CodCritSelec = @.CodCritSelec and
CIF.CodTpConta = TCO.CodTpConta
order by CodInstrFin, TCO.CodTpConta
for read only
select @.ErroSql = @.@.error
if @.ErroSql <> 0
begin
exec PCRMZZZZ0itratamsg @.ErroSql
return @.ErroSql
end
In the stored procedure they do not work, only the main query, wich has all
parameters set works well.
//this is an extract of the code from the stored procedure
open CritSelAgr
select @.ErroSql = @.@.error
if @.ErroSql <> 0
begin
exec PCRMZZZZ0itratamsg @.ErroSql
return @.ErroSql
end
select @.SqlStat = 0
while( @.SqlStat = 0 )
begin
fetch CritSelAgr into @.CodCritSelec, @.TodosSectInst, @.TodosPrzContr,
@.TodosPais,
@.TodosMoeda, @.Coeficiente
select @.ErroSql = @.@.error, @.SqlStat = @.@.fetch_status
if @.ErroSql <> 0
begin
exec PCRMZZZZ0itratamsg @.ErroSql
return @.ErroSql
end
if @.SqlStat <> 0
break
select @.InstrFin = NULL, @.SectInst = NULL, @.PrzContr = NULL, @.Pais =
NULL, @.Moeda = NULL
open CritInstrFin
select @.ErroSql = @.@.error
if @.ErroSql <> 0
begin
exec PCRMZZZZ0itratamsg @.ErroSql
return @.ErroSql
end
select @.SqlStatCrit = 0
while( @.SqlStatCrit = 0 )
begin
fetch CritInstrFin into @.CodInstrFin, @.CodTpConta, @.DescTpConta
select @.ErroSql = @.@.error, @.SqlStatCrit = @.@.fetch_status
//*****@.@.fetch_status is ALWAYS -1 here and in the other cursors as well
Is there a way to pass explicitly the parameters to a cursor or it's enough
to have the vars defined in the scope? (I think that's the problem)
Thaks in advanceSince you are changing platforms, wouldn't now be a good time to get rid of
any legacy cursor code? I expect this could be done much more quickly and
efficiently with set-based code.
If you need more help, please post a fuller description of the problem as
explained in the following article:
http://www.aspfaq.com/etiquette.asp?id=5006
David Portas
SQL Server MVP
--|||Thanks for the reply,
Do you mean
Set @.var = value?
"David Portas" wrote:

> Since you are changing platforms, wouldn't now be a good time to get rid o
f
> any legacy cursor code? I expect this could be done much more quickly and
> efficiently with set-based code.
> If you need more help, please post a fuller description of the problem as
> explained in the following article:
> http://www.aspfaq.com/etiquette.asp?id=5006
> --
> David Portas
> SQL Server MVP
> --
>|||No. Set-based code means declarative SQL code that operates on entire sets o
f
rows. On the other hand, cursor code only processes one row at a time. SQL
Server is optimized for set-based code, not for cursors.
Without more information it's hard to guess how to do it in your case but
you should aim to write code using regular SELECT, UPDATE, INSERT and DELETE
statements *without* cursors. Cursors are rarely a good idea and most of the
time you don't need them.
David Portas
SQL Server MVP
--|||do you mean set based logic like in joins?
as for ex: in http://techrepublic.com.com/5100-6228_11-5532304.html
"David Portas" wrote:

> No. Set-based code means declarative SQL code that operates on entire sets
of
> rows. On the other hand, cursor code only processes one row at a time. SQL
> Server is optimized for set-based code, not for cursors.
> Without more information it's hard to guess how to do it in your case but
> you should aim to write code using regular SELECT, UPDATE, INSERT and DELE
TE
> statements *without* cursors. Cursors are rarely a good idea and most of t
he
> time you don't need them.
> --
> David Portas
> SQL Server MVP
> --|||Joins are set based operations, yes.
David Portas
SQL Server MVP
--

Migration from SQL 6.5 to SQL 2000

We are migrating our SQL 6.5 application to SQL 2000 & having some difficulties for one Stored procedure . It is failing . Is there any problem
with "TINYINT" ? . Same stored procedure is working fine in SQL 6.5.

We are getting error msg while inserting some rows in following table.

tbl_sd_cmp_hier_detail
(

cmp_hier_id tinyint,
prnt_cmp_int smallint,
chld_cmp_int smallint
)

i will appriciate any help on this.Originally posted by ajayu
We are migrating our SQL 6.5 application to SQL 2000 & having some difficulties for one Stored procedure . It is failing . Is there any problem
with "TINYINT" ? . Same stored procedure is working fine in SQL 6.5.

We are getting error msg while inserting some rows in following table.

tbl_sd_cmp_hier_detail
(

cmp_hier_id tinyint,
prnt_cmp_int smallint,
chld_cmp_int smallint
)

i will appriciate any help on this.

There shouldn't be any problem with SQL 2000. I just ran this code in 2000:

USE pubs
GO

CREATE TABLE tbl_sd_cmp_hier_detail (
cmp_hier_id tinyint,
prnt_cmp_int smallint,
chld_cmp_int smallint
)
GO

INSERT INTO tbl_sd_cmp_hier_detail (
cmp_hier_id,
prnt_cmp_int,
chld_cmp_int
)
VALUES (
123,
456,
789
)
GO

SELECT * FROM dbo.tbl_sd_cmp_hier_detail
GO

I got this:

cmp_hier_id prnt_cmp_int chld_cmp_int
---- ---- ----
123 456 789

Try the code I pasted here. If that works, there is probably some other problem with the stored procedure.

Rob

Migration from SQL 2003 to 2005

I have an SQL database that uses standard tables and stored procedures
- no triggers and functions. I have a Microsoft Excel based front-end
which uses ADO to access the DB to (1) run stored procedures (some SPs
return recordsets and some do not), (2) insert data into tables (3)
edit table data using simple linked grid based forms.
This DB was initially created in SQL 2000 and then installed on a SQL
2003 server - absolutely no issues. Now, I have to upgrade to SQL
2005. I am not concerned about DB Admin issues but only my procedures
should not stop working or ADO calls not working (note that I am NOT
using the .NET platform).
It is probably difficult to give any sure answer with this limited
information but I am mainly looking for standard issues that most SQL
2003 databases will face on upgrading to 2005.
Thanks,
Jay
P.S. I am concerned about things like...SQL 2005 has changed the
syntax for cursors; it does not support regular ADO and you must use
ADO.NET; data type Decimal is not available any more and you must use
Numeric; Basically, things like these that will require me to change
my table structures or procedures.
Jay
Download Upgrade Advisor tool from MS site and run it against SS2000
database, see report file.
"Jay" <jay6447@.hotmail.com> wrote in message
news:35224406-0ab6-45a3-a92f-410aed08a23f@.s13g2000prd.googlegroups.com...
> I have an SQL database that uses standard tables and stored procedures
> - no triggers and functions. I have a Microsoft Excel based front-end
> which uses ADO to access the DB to (1) run stored procedures (some SPs
> return recordsets and some do not), (2) insert data into tables (3)
> edit table data using simple linked grid based forms.
> This DB was initially created in SQL 2000 and then installed on a SQL
> 2003 server - absolutely no issues. Now, I have to upgrade to SQL
> 2005. I am not concerned about DB Admin issues but only my procedures
> should not stop working or ADO calls not working (note that I am NOT
> using the .NET platform).
> It is probably difficult to give any sure answer with this limited
> information but I am mainly looking for standard issues that most SQL
> 2003 databases will face on upgrading to 2005.
> Thanks,
> Jay
>
> P.S. I am concerned about things like...SQL 2005 has changed the
> syntax for cursors; it does not support regular ADO and you must use
> ADO.NET; data type Decimal is not available any more and you must use
> Numeric; Basically, things like these that will require me to change
> my table structures or procedures.
>
>

Migration from SQL 2003 to 2005

I have an SQL database that uses standard tables and stored procedures
- no triggers and functions. I have a Microsoft Excel based front-end
which uses ADO to access the DB to (1) run stored procedures (some SPs
return recordsets and some do not), (2) insert data into tables (3)
edit table data using simple linked grid based forms.
This DB was initially created in SQL 2000 and then installed on a SQL
2003 server - absolutely no issues. Now, I have to upgrade to SQL
2005. I am not concerned about DB Admin issues but only my procedures
should not stop working or ADO calls not working (note that I am NOT
using the .NET platform).
It is probably difficult to give any sure answer with this limited
information but I am mainly looking for standard issues that most SQL
2003 databases will face on upgrading to 2005.
Thanks,
Jay
P.S. I am concerned about things like...SQL 2005 has changed the
syntax for cursors; it does not support regular ADO and you must use
ADO.NET; data type Decimal is not available any more and you must use
Numeric; Basically, things like these that will require me to change
my table structures or procedures.Jay
Download Upgrade Advisor tool from MS site and run it against SS2000
database, see report file.
"Jay" <jay6447@.hotmail.com> wrote in message
news:35224406-0ab6-45a3-a92f-410aed08a23f@.s13g2000prd.googlegroups.com...
> I have an SQL database that uses standard tables and stored procedures
> - no triggers and functions. I have a Microsoft Excel based front-end
> which uses ADO to access the DB to (1) run stored procedures (some SPs
> return recordsets and some do not), (2) insert data into tables (3)
> edit table data using simple linked grid based forms.
> This DB was initially created in SQL 2000 and then installed on a SQL
> 2003 server - absolutely no issues. Now, I have to upgrade to SQL
> 2005. I am not concerned about DB Admin issues but only my procedures
> should not stop working or ADO calls not working (note that I am NOT
> using the .NET platform).
> It is probably difficult to give any sure answer with this limited
> information but I am mainly looking for standard issues that most SQL
> 2003 databases will face on upgrading to 2005.
> Thanks,
> Jay
>
> P.S. I am concerned about things like...SQL 2005 has changed the
> syntax for cursors; it does not support regular ADO and you must use
> ADO.NET; data type Decimal is not available any more and you must use
> Numeric; Basically, things like these that will require me to change
> my table structures or procedures.
>
>|||"Jay" <jay6447@.hotmail.com> wrote in message
news:35224406-0ab6-45a3-a92f-410aed08a23f@.s13g2000prd.googlegroups.com...
> I have an SQL database that uses standard tables and stored procedures
> - no triggers and functions. I have a Microsoft Excel based front-end
> which uses ADO to access the DB to (1) run stored procedures (some SPs
> return recordsets and some do not), (2) insert data into tables (3)
> edit table data using simple linked grid based forms.
> This DB was initially created in SQL 2000 and then installed on a SQL
> 2003 server - absolutely no issues. Now, I have to upgrade to SQL
> 2005. I am not concerned about DB Admin issues but only my procedures
> should not stop working or ADO calls not working (note that I am NOT
> using the .NET platform).
> It is probably difficult to give any sure answer with this limited
> information but I am mainly looking for standard issues that most SQL
> 2003 databases will face on upgrading to 2005.
> Thanks,
> Jay
>
> P.S. I am concerned about things like...SQL 2005 has changed the
> syntax for cursors; it does not support regular ADO and you must use
> ADO.NET; data type Decimal is not available any more and you must use
> Numeric; Basically, things like these that will require me to change
> my table structures or procedures.
>
Hi Jay
There was not a version SQL 2003, so I assume this is Windows 2003 and the
SQL Server did not change?
To help you prepare the upgrade to SQL 2005 look at the upgrade advisor to
see what you may need to change when upgrading the database
http://www.microsoft.com/downloads/details.aspx?FamilyID=1470e86b-7e0...
and the upgrade handbook is worth checking out for the additional steps you
will need to do such as rebuilding indexes, statistics and updating usage
http://www.microsoft.com/technet/prodtechnol/sql/2005/sqlupgrd.mspx.
John

Migration from SQL 2000 to 2005

Hi

We are going to upgrade from SQL 2002 to 2005. We have approx. 100m
rows of data on the main table and hand of stored procs and views.

What we had in mind was that we would dts the data out, script the
stored procs and view out and import the it back into SQL 2005.

Is there smarter way of doing this?
The key thing is that the data must be clean

ThanksHi,

Why can't you just backup and restore the database in 2005? You can
change the compatibility level there to 90

I have done this before on dev databases and things seemed fine.

Kart

rc@.!die!.spammer.bhfshops.org.uk wrote:

Quote:

Originally Posted by

Hi
>
We are going to upgrade from SQL 2002 to 2005. We have approx. 100m
rows of data on the main table and hand of stored procs and views.
>
What we had in mind was that we would dts the data out, script the
stored procs and view out and import the it back into SQL 2005.
>
Is there smarter way of doing this?
The key thing is that the data must be clean
>
Thanks

|||I have "detached" the database on SQL 2000 and "re-attached" on SQL 2005
with no problems. You have to create the user logins and do the
sp_change_users_login.

<rc@.!die!.spammer.bhfshops.org.ukwrote in message
news:5rccj217fl7r2g5ijhh4hj4ha0nb308uvo@.4ax.com...

Quote:

Originally Posted by

Hi
>
We are going to upgrade from SQL 2002 to 2005. We have approx. 100m
rows of data on the main table and hand of stored procs and views.
>
What we had in mind was that we would dts the data out, script the
stored procs and view out and import the it back into SQL 2005.
>
Is there smarter way of doing this?
The key thing is that the data must be clean
>
Thanks

Monday, February 20, 2012

Migrating to SQL Server 2005;

Hi all,

I have a Database in SQL Server 2000 with several objects (tables, views , stored procedures , functions ).

Is there any specific procedure or tool by which I could migrate the entire database to SQL Server 2005.

Any help would be appreciated.

Thanks,

Hari Haran ArulmozhiAs far as I have seen, backup/restore works as an upgrade path.

Migrating to SQL 2005

Hi,
We are migrating from SQL 2000 personal edition to SQL 2005 developer
edition a 120 GB database. This database has around 1000 stored proc's
and 150 DTS packages.
I have read that running SQL Upgrade Advisor on the source would list
down incompatibilties (if any). Once this is done and say there are no
incompatibilties, how do I go about transferring the actual objects
with data? There seems to be quite a few options like detach/attach,
copy database wizard, restoring a backup etc
Which would be the best way to go about this? Can someone point me to
some good articles regarding this?
Thank you.
Regards,
KartHi
After you have corrected anything that the most recent upgrade advisor has
notified you of then you could use either method. Once the database is on SQ
L
2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
the indexes, update usage and statistics. I also prefer to recreate the
stored procedures/functions/views etc (which should not be an issue if you
have done everything the Upgrade advisor says!) Also make sure that the
users/logins are ok and there are no missing logins or orphaned users
http://support.microsoft.com/default.aspx/kb/314546, then regression and
performance test it.
Your DTS packages will require a little more work
http://msdn2.microsoft.com/en-us/library/ms143501.aspx
You may want to look at
http://www.microsoft.com/uk/technet...spx?videoid=135
http://rentacoder.com/CS/blogs/real.../04/28/477.aspx
I assume that your Developer Licence covers you for whatever usage this
database has?
John
"Kart" wrote:

> Hi,
> We are migrating from SQL 2000 personal edition to SQL 2005 developer
> edition a 120 GB database. This database has around 1000 stored proc's
> and 150 DTS packages.
> I have read that running SQL Upgrade Advisor on the source would list
> down incompatibilties (if any). Once this is done and say there are no
> incompatibilties, how do I go about transferring the actual objects
> with data? There seems to be quite a few options like detach/attach,
> copy database wizard, restoring a backup etc
> Which would be the best way to go about this? Can someone point me to
> some good articles regarding this?
> Thank you.
> Regards,
> Kart
>|||Hi John,
In case some of the SP's are encrypted in the source, would the copy wizard
take care of this?
Regards,
Karthik
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> After you have corrected anything that the most recent upgrade advisor has
> notified you of then you could use either method. Once the database is on
SQL
> 2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
> the indexes, update usage and statistics. I also prefer to recreate the
> stored procedures/functions/views etc (which should not be an issue if you
> have done everything the Upgrade advisor says!) Also make sure that the
> users/logins are ok and there are no missing logins or orphaned users
> http://support.microsoft.com/default.aspx/kb/314546, then regression and
> performance test it.
> Your DTS packages will require a little more work
> http://msdn2.microsoft.com/en-us/library/ms143501.aspx
> You may want to look at
> http://www.microsoft.com/uk/technet...spx?videoid=135
> http://rentacoder.com/CS/blogs/real.../04/28/477.aspx
> I assume that your Developer Licence covers you for whatever usage this
> database has?
> John
> "Kart" wrote:
>|||Hi
I am not sure why you want to use the copy wizard, I would transfer SPs by
scriptings, as we use a source control system (such as Visual Source Safe) w
e
already have the source. An upgrade of version is one of the times you can
see quite a few changes to stored procedures and a source control system is
essential if you want to keep track of changes. Versions prior to SQL 2005
would not transfer encrypted objects, so I would not assume it is different.
I would no use the copy wizard in an upgrade.
John
"Karthik" wrote:
[vbcol=seagreen]
> Hi John,
> In case some of the SP's are encrypted in the source, would the copy wizar
d
> take care of this?
> Regards,
> Karthik
> "John Bell" wrote:
>

Migrating to SQL 2005

Hi,
We are migrating from SQL 2000 personal edition to SQL 2005 developer
edition a 120 GB database. This database has around 1000 stored proc's
and 150 DTS packages.
I have read that running SQL Upgrade Advisor on the source would list
down incompatibilties (if any). Once this is done and say there are no
incompatibilties, how do I go about transferring the actual objects
with data? There seems to be quite a few options like detach/attach,
copy database wizard, restoring a backup etc
Which would be the best way to go about this? Can someone point me to
some good articles regarding this?
Thank you.
Regards,
Kart
Hi
After you have corrected anything that the most recent upgrade advisor has
notified you of then you could use either method. Once the database is on SQL
2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
the indexes, update usage and statistics. I also prefer to recreate the
stored procedures/functions/views etc (which should not be an issue if you
have done everything the Upgrade advisor says!) Also make sure that the
users/logins are ok and there are no missing logins or orphaned users
http://support.microsoft.com/default.aspx/kb/314546, then regression and
performance test it.
Your DTS packages will require a little more work
http://msdn2.microsoft.com/en-us/library/ms143501.aspx
You may want to look at
http://www.microsoft.com/uk/technet/itsshowtime/sessionh.aspx?videoid=135
http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
I assume that your Developer Licence covers you for whatever usage this
database has?
John
"Kart" wrote:

> Hi,
> We are migrating from SQL 2000 personal edition to SQL 2005 developer
> edition a 120 GB database. This database has around 1000 stored proc's
> and 150 DTS packages.
> I have read that running SQL Upgrade Advisor on the source would list
> down incompatibilties (if any). Once this is done and say there are no
> incompatibilties, how do I go about transferring the actual objects
> with data? There seems to be quite a few options like detach/attach,
> copy database wizard, restoring a backup etc
> Which would be the best way to go about this? Can someone point me to
> some good articles regarding this?
> Thank you.
> Regards,
> Kart
>
|||Hi John,
In case some of the SP's are encrypted in the source, would the copy wizard
take care of this?
Regards,
Karthik
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> After you have corrected anything that the most recent upgrade advisor has
> notified you of then you could use either method. Once the database is on SQL
> 2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
> the indexes, update usage and statistics. I also prefer to recreate the
> stored procedures/functions/views etc (which should not be an issue if you
> have done everything the Upgrade advisor says!) Also make sure that the
> users/logins are ok and there are no missing logins or orphaned users
> http://support.microsoft.com/default.aspx/kb/314546, then regression and
> performance test it.
> Your DTS packages will require a little more work
> http://msdn2.microsoft.com/en-us/library/ms143501.aspx
> You may want to look at
> http://www.microsoft.com/uk/technet/itsshowtime/sessionh.aspx?videoid=135
> http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
> I assume that your Developer Licence covers you for whatever usage this
> database has?
> John
> "Kart" wrote:
|||Hi
I am not sure why you want to use the copy wizard, I would transfer SPs by
scriptings, as we use a source control system (such as Visual Source Safe) we
already have the source. An upgrade of version is one of the times you can
see quite a few changes to stored procedures and a source control system is
essential if you want to keep track of changes. Versions prior to SQL 2005
would not transfer encrypted objects, so I would not assume it is different.
I would no use the copy wizard in an upgrade.
John
"Karthik" wrote:
[vbcol=seagreen]
> Hi John,
> In case some of the SP's are encrypted in the source, would the copy wizard
> take care of this?
> Regards,
> Karthik
> "John Bell" wrote:

Migrating to SQL 2005

Hi,
We are migrating from SQL 2000 personal edition to SQL 2005 developer
edition a 120 GB database. This database has around 1000 stored proc's
and 150 DTS packages.
I have read that running SQL Upgrade Advisor on the source would list
down incompatibilties (if any). Once this is done and say there are no
incompatibilties, how do I go about transferring the actual objects
with data? There seems to be quite a few options like detach/attach,
copy database wizard, restoring a backup etc
Which would be the best way to go about this? Can someone point me to
some good articles regarding this?
Thank you.
Regards,
KartHi
After you have corrected anything that the most recent upgrade advisor has
notified you of then you could use either method. Once the database is on SQL
2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
the indexes, update usage and statistics. I also prefer to recreate the
stored procedures/functions/views etc (which should not be an issue if you
have done everything the Upgrade advisor says!) Also make sure that the
users/logins are ok and there are no missing logins or orphaned users
http://support.microsoft.com/default.aspx/kb/314546, then regression and
performance test it.
Your DTS packages will require a little more work
http://msdn2.microsoft.com/en-us/library/ms143501.aspx
You may want to look at
http://www.microsoft.com/uk/technet/itsshowtime/sessionh.aspx?videoid=135
http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
I assume that your Developer Licence covers you for whatever usage this
database has?
John
"Kart" wrote:
> Hi,
> We are migrating from SQL 2000 personal edition to SQL 2005 developer
> edition a 120 GB database. This database has around 1000 stored proc's
> and 150 DTS packages.
> I have read that running SQL Upgrade Advisor on the source would list
> down incompatibilties (if any). Once this is done and say there are no
> incompatibilties, how do I go about transferring the actual objects
> with data? There seems to be quite a few options like detach/attach,
> copy database wizard, restoring a backup etc
> Which would be the best way to go about this? Can someone point me to
> some good articles regarding this?
> Thank you.
> Regards,
> Kart
>|||Hi John,
In case some of the SP's are encrypted in the source, would the copy wizard
take care of this?
Regards,
Karthik
"John Bell" wrote:
> Hi
> After you have corrected anything that the most recent upgrade advisor has
> notified you of then you could use either method. Once the database is on SQL
> 2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
> the indexes, update usage and statistics. I also prefer to recreate the
> stored procedures/functions/views etc (which should not be an issue if you
> have done everything the Upgrade advisor says!) Also make sure that the
> users/logins are ok and there are no missing logins or orphaned users
> http://support.microsoft.com/default.aspx/kb/314546, then regression and
> performance test it.
> Your DTS packages will require a little more work
> http://msdn2.microsoft.com/en-us/library/ms143501.aspx
> You may want to look at
> http://www.microsoft.com/uk/technet/itsshowtime/sessionh.aspx?videoid=135
> http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
> I assume that your Developer Licence covers you for whatever usage this
> database has?
> John
> "Kart" wrote:
> > Hi,
> >
> > We are migrating from SQL 2000 personal edition to SQL 2005 developer
> > edition a 120 GB database. This database has around 1000 stored proc's
> > and 150 DTS packages.
> >
> > I have read that running SQL Upgrade Advisor on the source would list
> > down incompatibilties (if any). Once this is done and say there are no
> > incompatibilties, how do I go about transferring the actual objects
> > with data? There seems to be quite a few options like detach/attach,
> > copy database wizard, restoring a backup etc
> >
> > Which would be the best way to go about this? Can someone point me to
> > some good articles regarding this?
> >
> > Thank you.
> >
> > Regards,
> > Kart
> >
> >|||Hi
I am not sure why you want to use the copy wizard, I would transfer SPs by
scriptings, as we use a source control system (such as Visual Source Safe) we
already have the source. An upgrade of version is one of the times you can
see quite a few changes to stored procedures and a source control system is
essential if you want to keep track of changes. Versions prior to SQL 2005
would not transfer encrypted objects, so I would not assume it is different.
I would no use the copy wizard in an upgrade.
John
"Karthik" wrote:
> Hi John,
> In case some of the SP's are encrypted in the source, would the copy wizard
> take care of this?
> Regards,
> Karthik
> "John Bell" wrote:
> > Hi
> >
> > After you have corrected anything that the most recent upgrade advisor has
> > notified you of then you could use either method. Once the database is on SQL
> > 2005 (SP1) you should make sure the compatibility is SQL 2005, rebuild all
> > the indexes, update usage and statistics. I also prefer to recreate the
> > stored procedures/functions/views etc (which should not be an issue if you
> > have done everything the Upgrade advisor says!) Also make sure that the
> > users/logins are ok and there are no missing logins or orphaned users
> > http://support.microsoft.com/default.aspx/kb/314546, then regression and
> > performance test it.
> >
> > Your DTS packages will require a little more work
> > http://msdn2.microsoft.com/en-us/library/ms143501.aspx
> >
> > You may want to look at
> > http://www.microsoft.com/uk/technet/itsshowtime/sessionh.aspx?videoid=135
> > http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
> >
> > I assume that your Developer Licence covers you for whatever usage this
> > database has?
> >
> > John
> >
> > "Kart" wrote:
> >
> > > Hi,
> > >
> > > We are migrating from SQL 2000 personal edition to SQL 2005 developer
> > > edition a 120 GB database. This database has around 1000 stored proc's
> > > and 150 DTS packages.
> > >
> > > I have read that running SQL Upgrade Advisor on the source would list
> > > down incompatibilties (if any). Once this is done and say there are no
> > > incompatibilties, how do I go about transferring the actual objects
> > > with data? There seems to be quite a few options like detach/attach,
> > > copy database wizard, restoring a backup etc
> > >
> > > Which would be the best way to go about this? Can someone point me to
> > > some good articles regarding this?
> > >
> > > Thank you.
> > >
> > > Regards,
> > > Kart
> > >
> > >

Migrating to 2005

Im trying to move from a 2000 server to 2005 server. However when I try to d
o
the import there is no option for selecting UDF's or stored procedures, just
tables and views...is there a way to get these over?..thanks
-JimI would detach the database(s) and then attach it on the 2005 instance, or
use backup/restore unless you have a specific reason for
exporting/importing.
See the Books Online topic "How to: Upgrade a Database Using Detach and
Attach (Transact-SQL) " for more info if you need it.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:693C6609-EA67-4130-8EF8-024FD5318AAC@.microsoft.com...
> Im trying to move from a 2000 server to 2005 server. However when I try to
> do
> the import there is no option for selecting UDF's or stored procedures,
> just
> tables and views...is there a way to get these over?..thanks
> -Jim