Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Thursday, March 29, 2012

Converting database from 32-bit SQL Server 2005 to 64-bit version of SQL Server 2005

I recently upgraded to SQL Server 2005. My databases are stable and functioning perfectly. However, these databases are using the 32-bit version of SQL Server. The servers are going to be upgraded to 64-bit processors and new Server 2003 64-bit OS's.

Everything I have been able to find says that it is a simple process of backing up the databases in the 32-bit environment and restoring them in the 64-bit environment.

Could it really be that easy? I am looking for someone who has done this to provide any "heads up" commentary on what to look out for during that process. Can anyone provide some information on this process?

Thanks.

i have migrated SQL Server 2000 32 bit database to SQL Server 20005 64 bit version using backup/restore method. This is the best method to migrate the database i would say. there is nothing special while you restore sql server 2005 32 bit backup in 64 bit server.

Madhu

|||

Yes it really is that simple. You can either do a backup and restore or a detach and attach. (With large databases and SAN storage the detach and attach is usually easer and you can just move the drives from one server to another.)

If the new server doesn't work out, moving back is just as simple. Backup and Restore or detach and attach.

Sunday, March 25, 2012

Converting Access 2000 to SQL

Ok, I finally figured out SQL somewhat. I cannot upsize all of my databases using the upsize wizard provided with Access 2000. I can upsize some database, but most importantly, not the one I need to upsize. Does anybody have any idea why some would upsize and some wouldn't? Could it be a problem with linked tables? OR is there any other way of converting the access databases into SQL databases for SQL Server 2000? Remember, I am a very first time SQL user.
Thanks a lot,
Aaron Shoverwith SQL Server a very handy tool is delivered: Data Transformation Services (DTS). You can use DTS to transform data from one source to another for all major databases, office applications, text files and more. If you are willing to convert to SQL Server this is probably the way to go. You can search in the Books Online for more info.
You can also set up your Access databases as linked servers to access them from SQL server, but conversion is probably better.|||I found the DTS and I used it. Now, this database has a front end and a backend. When I transferred the front end all it allowed me to transfer were the queries. So then I had to go to the back end and transfer the backend in order to transfer the tables. I assume this is because of the database being split, and if it wasn't it would allow me to do both at the same time?|||well the tables aren't located in the front end - how can they be transferred??

They are only *linked* to the tables in the back end.|||That's what I thought; I just wanted conformation so I understand everything that is going on.

Thursday, March 22, 2012

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J Morgan
Hi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:

> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J MorganHi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:

> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J MorganHi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:
> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>sqlsql

Tuesday, March 20, 2012

Convert, downsize, SQL Server database to Microsoft Access

. . . I know, WHY would I want to do this?! Well I like to develop databases in SQLServer, but there is a chance that when I transition this database to the client, they will only have Access at their disposal. Hence before I begin creating the database in SQL Server, I would like to know if it's easy to convert to Access should the need arise.

Thank you in advance,

DanRegards.
Why Access?

Convertion to SQL Server 2005 Express would be so much easier. Smaller chance of client changing things, also.

Just one warning from the license:
http://download.microsoft.com/download/8/9/1/891cf345-643c-49a7-98bc-58bc04def37a/SQLServer2005ExpressEdnDistributionLicense.rtf

3. INTERNET-BASED SERVICES. Microsoft provides Internet-based services with the software. It may change or cancel them at any time
|||

Good point. As for why Access, the one IT person in the office uses Access, and I don't think it will be in my scope to switch her to SQL Server or even SQL Server express.

convert varchar to numeric(4,2)

Hi,

I have two databases SQL Server. I′m migrating tables from one database to other,
but some columns are diferent data types.

Is there a way to convert varchar to numeric(4,2) like follows:

select convert(numeric(4,2), discounting)
from database1.dbo.table1

the following error occurs:

Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.

How can I do this?

thanks!!!!

The error message indicates that you have values in the column that cannot be converted to numeric successfully. You could use ISNUMERIC to check for such values and filter them but it may not be entirely accurate (since ISNUMERIC checks for several numeric type conversions, money and integer conversions). In the simple case, you could write your SELECT statement like:

select case isnumeric(discounting) when 1 then convert(numeric(4,2), discounting) end
from database1.dbo.table1

|||

ivision.wordpress.com/2006/12/05/custom-function-to-convert-varchar-to-int/

convert varchar to numeric(4,2)

Hi,

I have two databases SQL Server. I′m migrating tables from one database to other,
but some columns are diferent data types.

Is there a way to convert varchar to numeric(4,2) like follows:

select convert(numeric(4,2), discounting)
from database1.dbo.table1

the following error occurs:

Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.

How can I do this?

thanks!!!!

The error message indicates that you have values in the column that cannot be converted to numeric successfully. You could use ISNUMERIC to check for such values and filter them but it may not be entirely accurate (since ISNUMERIC checks for several numeric type conversions, money and integer conversions). In the simple case, you could write your SELECT statement like:

select case isnumeric(discounting) when 1 then convert(numeric(4,2), discounting) end
from database1.dbo.table1

|||

ivision.wordpress.com/2006/12/05/custom-function-to-convert-varchar-to-int/

sqlsql

Tuesday, February 14, 2012

Convert Foreign Key to Foreign Key with Delete Cascade

We sometimes get very large databases that we want to cut down to use for
testing.
The information is all related to a central accounts table.
The way I thought of doing this is to grab all the foreign constraints and
turn them into cascade delete constraints, then delete as many accounts as I
want.
After this I will restore the constraints back to their original state.
I am having a problem doing this as I cannot find a way to programatically
get the add constraint foreign key sql.
For example, I can use sysforeignkeys to list all the foreign keys or
ADO.OpenSchema(adSchemaForeignKeys...) but this doesn't give me the actual
SQL to modify.
My idea was to go through the database saying:
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key) on delete cascade
delete various accounts and related data
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key)
Can anyone assist?
Thanks
Jason, that looks like the best approach to me as well.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Convert Foreign Key to Foreign Key with Delete Cascade

We sometimes get very large databases that we want to cut down to use for
testing.
The information is all related to a central accounts table.
The way I thought of doing this is to grab all the foreign constraints and
turn them into cascade delete constraints, then delete as many accounts as I
want.
After this I will restore the constraints back to their original state.
I am having a problem doing this as I cannot find a way to programatically
get the add constraint foreign key sql.
For example, I can use sysforeignkeys to list all the foreign keys or
ADO.OpenSchema(adSchemaForeignKeys...) but this doesn't give me the actual
SQL to modify.
My idea was to go through the database saying:
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key) on delete cascade
delete various accounts and related data
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key)
Can anyone assist?
ThanksJason, that looks like the best approach to me as well.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Convert Foreign Key to Foreign Key with Delete Cascade

We sometimes get very large databases that we want to cut down to use for
testing.
The information is all related to a central accounts table.
The way I thought of doing this is to grab all the foreign constraints and
turn them into cascade delete constraints, then delete as many accounts as I
want.
After this I will restore the constraints back to their original state.
I am having a problem doing this as I cannot find a way to programatically
get the add constraint foreign key sql.
For example, I can use sysforeignkeys to list all the foreign keys or
ADO.OpenSchema(adSchemaForeignKeys...) but this doesn't give me the actual
SQL to modify.
My idea was to go through the database saying:
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key) on delete cascade
delete various accounts and related data
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key)
Can anyone assist?
ThanksJason, that looks like the best approach to me as well.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Convert Foreign Key to Foreign Key with Delete Cascade

We sometimes get very large databases that we want to cut down to use for
testing.
The information is all related to a central accounts table.
The way I thought of doing this is to grab all the foreign constraints and
turn them into cascade delete constraints, then delete as many accounts as I
want.
After this I will restore the constraints back to their original state.
I am having a problem doing this as I cannot find a way to programatically
get the add constraint foreign key sql.
For example, I can use sysforeignkeys to list all the foreign keys or
ADO.OpenSchema(adSchemaForeignKeys...) but this doesn't give me the actual
SQL to modify.
My idea was to go through the database saying:
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key) on delete cascade
delete various accounts and related data
alter table (tablename) drop constraint (foreign key)
alter table (tablename) add constraint (foreign key)
Can anyone assist?
Thanks
Hi
Erland posted this a short time ago, you should be able to modify it to meet
your needs:
http://tinyurl.com/6o9af
John
"Jason Madison" <jason.madison@.btinternet.com> wrote in message
news:e9zk36GZEHA.2576@.TK2MSFTNGP10.phx.gbl...
> We sometimes get very large databases that we want to cut down to use for
> testing.
> The information is all related to a central accounts table.
> The way I thought of doing this is to grab all the foreign constraints and
> turn them into cascade delete constraints, then delete as many accounts as
I
> want.
> After this I will restore the constraints back to their original state.
> I am having a problem doing this as I cannot find a way to programatically
> get the add constraint foreign key sql.
> For example, I can use sysforeignkeys to list all the foreign keys or
> ADO.OpenSchema(adSchemaForeignKeys...) but this doesn't give me the actual
> SQL to modify.
> My idea was to go through the database saying:
> alter table (tablename) drop constraint (foreign key)
> alter table (tablename) add constraint (foreign key) on delete cascade
> delete various accounts and related data
> alter table (tablename) drop constraint (foreign key)
> alter table (tablename) add constraint (foreign key)
> Can anyone assist?
> Thanks
>
>

Sunday, February 12, 2012

Convert Dbs from SQL Server 2005 to 2000

I need to convert my SQL Server 2005 databases (and Stored procs) to ones
that will run SQL 2000. How do I do this?
If you haven't used any of the new 2005 features or datatypes you should be
able to script out the schema and run it against the 2000 box. If you have
data to migrate you can bcp it although you may need to use one of the
character formats.
Andrew J. Kelly SQL MVP
"FredC" <FredC@.discussions.microsoft.com> wrote in message
news:3E3ADB6F-9100-4AAC-AB09-09B1BB4F9CDF@.microsoft.com...
>I need to convert my SQL Server 2005 databases (and Stored procs) to ones
> that will run SQL 2000. How do I do this?