Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Monday, March 26, 2012

migrating 2000 partitionned view to 2005 partitionned table?

Hi,
I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
by year. (Fact_Table_2003, Fact_Table_2004,...)
I want to test to migrate to 2005 and I want to use the new partitionned
table options.
how to do this easely?
thanks.
Jerome.
I have not had to do this yet, so this is all theory from my
perspective.
But from what I have seen, you should be able to backup/restore your
database "as is" and then I from what I have seen, you just need to do
an ALTER TABLE...SWITCH to move the table data around. BOL has a topic
on "moving partitioned data" which lists one of the uses of SWITCH as
"Assigning a table as a partition to an already existing partitioned
table."
Assigning partitions to different tables is just a meta data operation
so it happens very quickly, no data is copied, pointers to the data are
just updated.
In a nutshell I think the process would go something like this:
1. migrate the database onto SQL2k5
2. join all the tables together using "ALTER TABLE..SWITCH"
3. drop the view
4. rename the table from step 2. with the same name as the view
5. re-create any Referential Integrity constraints
I would suggest doing a test on small sample database first (a copy of
one of the sample databases maybe)
HTH
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <ePn#4Tk7FHA.3876@.TK2MSFTNGP09.phx.gbl>,
willgart@.BBBhotmailAAA.com says...
> Hi,
> I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
> by year. (Fact_Table_2003, Fact_Table_2004,...)
> I want to test to migrate to 2005 and I want to use the new partitionned
> table options.
> how to do this easely?
> thanks.
> Jerome.
>
>

migrating 2000 partitionned view to 2005 partitionned table?

Hi,
I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
by year. (Fact_Table_2003, Fact_Table_2004,...)
I want to test to migrate to 2005 and I want to use the new partitionned
table options.
how to do this easely?
thanks.
Jerome.I have not had to do this yet, so this is all theory from my
perspective.
But from what I have seen, you should be able to backup/restore your
database "as is" and then I from what I have seen, you just need to do
an ALTER TABLE...SWITCH to move the table data around. BOL has a topic
on "moving partitioned data" which lists one of the uses of SWITCH as
"Assigning a table as a partition to an already existing partitioned
table."
Assigning partitions to different tables is just a meta data operation
so it happens very quickly, no data is copied, pointers to the data are
just updated.
In a nutshell I think the process would go something like this:
1. migrate the database onto SQL2k5
2. join all the tables together using "ALTER TABLE..SWITCH"
3. drop the view
4. rename the table from step 2. with the same name as the view
5. re-create any Referential Integrity constraints
I would suggest doing a test on small sample database first (a copy of
one of the sample databases maybe)
HTH
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <ePn#4Tk7FHA.3876@.TK2MSFTNGP09.phx.gbl>,
willgart@.BBBhotmailAAA.com says...
> Hi,
> I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
> by year. (Fact_Table_2003, Fact_Table_2004,...)
> I want to test to migrate to 2005 and I want to use the new partitionned
> table options.
> how to do this easely?
> thanks.
> Jerome.
>
>

migrating 2000 partitionned view to 2005 partitionned table?

Hi,
I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
by year. (Fact_Table_2003, Fact_Table_2004,...)
I want to test to migrate to 2005 and I want to use the new partitionned
table options.
how to do this easely?
thanks.
Jerome.
I have not had to do this yet, so this is all theory from my
perspective.
But from what I have seen, you should be able to backup/restore your
database "as is" and then I from what I have seen, you just need to do
an ALTER TABLE...SWITCH to move the table data around. BOL has a topic
on "moving partitioned data" which lists one of the uses of SWITCH as
"Assigning a table as a partition to an already existing partitioned
table."
Assigning partitions to different tables is just a meta data operation
so it happens very quickly, no data is copied, pointers to the data are
just updated.
In a nutshell I think the process would go something like this:
1. migrate the database onto SQL2k5
2. join all the tables together using "ALTER TABLE..SWITCH"
3. drop the view
4. rename the table from step 2. with the same name as the view
5. re-create any Referential Integrity constraints
I would suggest doing a test on small sample database first (a copy of
one of the sample databases maybe)
HTH
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <ePn#4Tk7FHA.3876@.TK2MSFTNGP09.phx.gbl>,
willgart@.BBBhotmailAAA.com says...
> Hi,
> I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
> by year. (Fact_Table_2003, Fact_Table_2004,...)
> I want to test to migrate to 2005 and I want to use the new partitionned
> table options.
> how to do this easely?
> thanks.
> Jerome.
>
>

migrating 2000 partitionned view to 2005 partitionned table?

Hi,
I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionned
by year. (Fact_Table_2003, Fact_Table_2004,...)
I want to test to migrate to 2005 and I want to use the new partitionned
table options.
how to do this easely?
thanks.
Jerome.I have not had to do this yet, so this is all theory from my
perspective.
But from what I have seen, you should be able to backup/restore your
database "as is" and then I from what I have seen, you just need to do
an ALTER TABLE...SWITCH to move the table data around. BOL has a topic
on "moving partitioned data" which lists one of the uses of SWITCH as
"Assigning a table as a partition to an already existing partitioned
table."
Assigning partitions to different tables is just a meta data operation
so it happens very quickly, no data is copied, pointers to the data are
just updated.
In a nutshell I think the process would go something like this:
1. migrate the database onto SQL2k5
2. join all the tables together using "ALTER TABLE..SWITCH"
3. drop the view
4. rename the table from step 2. with the same name as the view
5. re-create any Referential Integrity constraints
I would suggest doing a test on small sample database first (a copy of
one of the sample databases maybe)
HTH
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <ePn#4Tk7FHA.3876@.TK2MSFTNGP09.phx.gbl>,
willgart@.BBBhotmailAAA.com says...
> Hi,
> I have an SQL 2000 datawarehouse where my 2 biggest tables are partitionne
d
> by year. (Fact_Table_2003, Fact_Table_2004,...)
> I want to test to migrate to 2005 and I want to use the new partitionned
> table options.
> how to do this easely?
> thanks.
> Jerome.
>
>sql

Friday, March 23, 2012

Migrate VIEW from Access to SQLserver ??

I migrated a DB from Access 2000 to SQLserver 2000.

The tables are OK, but I see the old Access views... as TABLE in
SQLserver!!

Any suggestions?

--Access isn't "smart" enough to upsize its queries into MS SQL Server views
so instead it just runs the query and creates a table from the result.
You'll have to port all of the queries manually (although I'm sure there are
tools or at least guides to help you with this) since Access's SQL differs
from MS SQL Server's SQL. Some of the most common issues I've run in are
that MS SQL Server doesn't have all those handy VB functions and IsNull()
does not work the same way in both.

"YURYSSG" <yuryssg@.yahoo.it> wrote in message
news:2i85qbFjsi78U1@.uni-berlin.de...
> I migrated a DB from Access 2000 to SQLserver 2000.
> The tables are OK, but I see the old Access views... as TABLE in
> SQLserver!!
> Any suggestions?
> --|||"Jonathan Amend" <cephas_is@.hotmail.com> /
: news:40bf8fc4$1_3@.aeinews...
> Access isn't "smart" enough to upsize its queries into MS SQL Server views
> so instead it just runs the query and creates a table from the result.
> You'll have to port all of the queries manually (although I'm sure there
are
> tools or at least guides to help you with this) since Access's SQL differs
> from MS SQL Server's SQL. Some of the most common issues I've run in are
> that MS SQL Server doesn't have all those handy VB functions and IsNull()
> does not work the same way in both.
> "YURYSSG" <yuryssg@.yahoo.it> wrote in message
> news:2i85qbFjsi78U1@.uni-berlin.de...
> > I migrated a DB from Access 2000 to SQLserver 2000.
> > The tables are OK, but I see the old Access views... as TABLE in
> > SQLserver!!
> > Any suggestions?
> > --|||"Jonathan Amend" <cephas_is@.hotmail.com> wrote:

>Access isn't "smart" enough to upsize its queries into MS SQL Server views
>so instead it just runs the query and creates a table from the result.
>You'll have to port all of the queries manually (although I'm sure there are
>tools or at least guides to help you with this) since Access's SQL differs
>from MS SQL Server's SQL. Some of the most common issues I've run in are
>that MS SQL Server doesn't have all those handy VB functions and IsNull()
>does not work the same way in both.

FWIW I was able to programmatically make views out of many of my
Access queries.

I had much more code than this but the basics were as follows.

strNewSQL = adhReplace(Q.SQL, vbCrLf, " ")
strNewSQL = Left(strNewSQL, InStr(strNewSQL, ";") - 1)
strNewSQL = ConvertTrueFalseTo10(strNewSQL)

tagRetryAfterCleanup:
Set myquerydef = dbsPermanent.CreateQueryDef("")
'Q.Name & " DAO Test")
myquerydef.ReturnsRecords = False
myquerydef.Connect = strConnect
myquerydef.SQL = "CREATE VIEW [" & strQueryName & "]
AS " & strNewSQL
myquerydef.Execute
myquerydef.Close

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm

Monday, February 20, 2012

Microsoft SQL Server Management Studio problem

The 'Reports' button on the Summary screen is disabled. How can I get it enabled so that I can view the database dashboard?

I have installed SQL Server 2005 Developer Edition with Reporting services

ThanksThe Reports button is context sensitive. In the object browser, click/highlight your database, then the reports button should be enabled. A wrote in message news:61cb2041-e52f-4503-b439-60aa3ba7eefc@.discussions.microsoft.com...
> The 'Reports' button on the Summary screen is disabled. How can I get it
> enabled so that I can view the database dashboard? >
> I have installed SQL Server 2005 Developer Edition with Reporting
> services >
> Thanks
>|||That is right. It is context specific. It is enabled when a DB is selected and similarly, the report button is enabled when server is selected to see server dashbord.