Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Monday, March 12, 2012

MSDE & database moving.

Hi,

How to copy database diagram (all data) to other server using only MSDE
server and VS.Net Proffesional? I have no Enterprice manager. I have to
move database (create on my machine) to my customer server. Is some
possibilities?
--
*Pozdrawiam,*
Klaudiusz Bryjahi,
"bryja_klaudiusz[at]poczta[dot]fm" <dla@.zmyly.pl> ha scritto nel messaggio
news:c67ou4$i2p$1@.atlantis.news.tpi.pl...
> Hi,
> How to copy database diagram (all data) to other server using only MSDE
> server and VS.Net Proffesional? I have no Enterprice manager. I have to
> move database (create on my machine) to my customer server. Is some
> possibilities?
> --
> *Pozdrawiam,*
> Klaudiusz Bryja
you actually have 3 possibilities..
1)
you can detach your database(s), copy all the physical files you database is
made of to you user's server and re-attach the database using the system
stored procedure
EXEC sp_detach_db 'database_name' -- for detaching
and
EXEC sp_attach_db @.dbname = 'dbname'
, @.filename1 = 'c:\...\physical_position_Datafile.Mdf'
, @.filenameN = 'c:\...\physical_position_Logfile.Ldf'

ah... you have to re-attach the database to your server to, after copying
the files to a distribution media...
up to 16 data and log files can be specified, but please have a look at
http://msdn.microsoft.com/library/d..._ae-az_52oy.asp
for sp_attch_db synopsis and syntax...

2)
you can (full) backup you database(s) and restore it to your user's server
using
RESTORE DATABASE database_name
FROM DISK = 'c:\...\backup.bck'
WITH MOVE 'logical_Datafile_name' TO 'c:\..\newDataFilePosition.Mdf'
MOVE 'logical_Logfile_name' TO 'c:\..\newLogFilePosition.Ldf'

the WITH MOVE option grants you the possibility to specify alternate
physical positions on user's server, other than your original locations on
your dev server
please have a look at
http://msdn.microsoft.com/library/d..._ra-rz_25rm.asp
for Transact SQL backup syntax.

both these 2 methods are easy to implement, they can be performed on user's
server using ADO/AdoNet commands as long as via oSql.exe or similar tools...
they suffer a common scenario... you will restoring your database, based on
your model database, with your server settings regarding collation/sort
order, database options (autogrowth, autoshrink, size, recovery model and so
on), and more, they miss the ability to inherits objects/users existing in
user's model database.. another issue is you can propagate "orphaned users"
troubles if you not correctly purge your distribution database before
distributing it (more about "orphaned users" at
http://www.sqlservercentral.com/col...rokenlogins.asp)

3)
another way is to script out your database structure using tools like
Enterprise Manager or ObjectScripter, provided for free by MVP OJ at
http://www.rac4sql.net/objectscriptr_main.asp...
once the structure is exported to file, you can easily script out table
contents creating INSERT INTO sql scripts to be run in order to reload
pre-poluated tables, using the well known procedure provided by MVP Narayana
Vyas Kondreddi at http://vyaskn.tripod.com/code.htm#inserts (there are
other variations of that available on the net)
personally I do prefer this method, which grant me greater and more granular
control, where I can provide T-SQL DDL scripts, INSERT INTO scripts as long
as BCP possibility for larger tables/views.. this comes in handy for
structure version sync to, becouse the tool you provide for database
distribution can be prepared for upgrading database structure too.. and all
user's server and database settings are respected...
this method grants greater flexibility at the cost of greater complexity...
hth
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--- remove DMO to reply|||Hi,

Thanks. It helped.

>hi,
>"bryja_klaudiusz[at]poczta[dot]fm" <dla@.zmyly.pl> ha scritto nel messaggio
>news:c67ou4$i2p$1@.atlantis.news.tpi.pl...
>
>>Hi,
>>
>>How to copy database diagram (all data) to other server using only MSDE
>>server and VS.Net Proffesional? I have no Enterprice manager. I have to
>>move database (create on my machine) to my customer server. Is some
>>possibilities?
>>--
>>*Pozdrawiam,*
>>Klaudiusz Bryja
>>
>>
>>
>you actually have 3 possibilities..
>1)
>you can detach your database(s), copy all the physical files you database is
>made of to you user's server and re-attach the database using the system
>stored procedure
>EXEC sp_detach_db 'database_name' -- for detaching
>and
>EXEC sp_attach_db @.dbname = 'dbname'
> , @.filename1 = 'c:\...\physical_position_Datafile.Mdf'
> , @.filenameN = 'c:\...\physical_position_Logfile.Ldf'
>ah... you have to re-attach the database to your server to, after copying
>the files to a distribution media...
>up to 16 data and log files can be specified, but please have a look at
>http://msdn.microsoft.com/library/d..._ae-az_52oy.asp
>for sp_attch_db synopsis and syntax...
>2)
>you can (full) backup you database(s) and restore it to your user's server
>using
>RESTORE DATABASE database_name
> FROM DISK = 'c:\...\backup.bck'
> WITH MOVE 'logical_Datafile_name' TO 'c:\..\newDataFilePosition.Mdf'
> MOVE 'logical_Logfile_name' TO 'c:\..\newLogFilePosition.Ldf'
>the WITH MOVE option grants you the possibility to specify alternate
>physical positions on user's server, other than your original locations on
>your dev server
>please have a look at
>http://msdn.microsoft.com/library/d..._ra-rz_25rm.asp
>for Transact SQL backup syntax.
>both these 2 methods are easy to implement, they can be performed on user's
>server using ADO/AdoNet commands as long as via oSql.exe or similar tools...
>they suffer a common scenario... you will restoring your database, based on
>your model database, with your server settings regarding collation/sort
>order, database options (autogrowth, autoshrink, size, recovery model and so
>on), and more, they miss the ability to inherits objects/users existing in
>user's model database.. another issue is you can propagate "orphaned users"
>troubles if you not correctly purge your distribution database before
>distributing it (more about "orphaned users" at
>http://www.sqlservercentral.com/col...rokenlogins.asp)
>3)
>another way is to script out your database structure using tools like
>Enterprise Manager or ObjectScripter, provided for free by MVP OJ at
>http://www.rac4sql.net/objectscriptr_main.asp...
>once the structure is exported to file, you can easily script out table
>contents creating INSERT INTO sql scripts to be run in order to reload
>pre-poluated tables, using the well known procedure provided by MVP Narayana
>Vyas Kondreddi at http://vyaskn.tripod.com/code.htm#inserts (there are
>other variations of that available on the net)
>personally I do prefer this method, which grant me greater and more granular
>control, where I can provide T-SQL DDL scripts, INSERT INTO scripts as long
>as BCP possibility for larger tables/views.. this comes in handy for
>structure version sync to, becouse the tool you provide for database
>distribution can be prepared for upgrading database structure too.. and all
>user's server and database settings are respected...
>this method grants greater flexibility at the cost of greater complexity...
>hth

MSDE - moving a copy of a database and reloading onto another PC

I need to the best way to make a copy(Backup/export) of the data base put in on a CD or e-mail it. Have instructions to import or restore the database onto another PC.
Also in the C:\Program Files\Microsoft SQL Server\80\Tools\Binn>
What and how does dtsrun.exe work?
Thanks
These articles might help ..
314546 HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/?id=314546
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
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.
|||These articles might help ..
314546 HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/?id=314546
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
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.

MSDE - moving a copy of a database and reloading onto another PC

I need to the best way to make a copy(Backup/export) of the data base put in on a CD or e-mail it. Have instructions to import or restore the database onto another PC.
Also in the C:\Program Files\Microsoft SQL Server\80\Tools\Binn>
What and how does dtsrun.exe work?
Thanks
Please refer to these articles that might help -
314546 HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/?id=314546
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
Cheers,
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.
|||Please refer to these articles that might help -
314546 HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/?id=314546
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
Cheers,
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.

Friday, March 9, 2012

MSDE - ADP Question

Hi,

After upsizing on MSDE, I created ADP on my terminal.

When the created ADP I need to copy to another user to get connected to MSDE hosted on my pc I followed these steps.

First I copied ADP to the user's pc and

1. Opened Administration Tools on user's pc
2. Clicked twice Data Source (ODBC) icon
3. Selected System DSN and clicked Add
4. Selected SQL Server (Last item) and Finish
5. Given new connection name (any name) in the field 'Name'. Description left empty. In Servaer, typed server name.
6. In the next page, I selected SQL Server Authentication and...

Here is my question:

Should I use at this step System Administrator's login id and password ?

OR

Should I use user's pc id and password ?

I tried both way. But login fails.

Where might have gone wrong? BTW, this the first user I trying on.

Any help would be highly appreviated.

With kind regards,

Ashfaquecreate a sql login in our MSDE using sp_addlogin and then use sp_adduser to grant them specific db access. see details in BOL. if you are using Wndows XP SP2 you may have to create an exception in the personal firewall r drop it altogether.|||Thanks Thrasymachus,

I would appreciate it very much if you could little bit in detail as I am new bee for this area.

With kind regards,

Ashfaque|||Do you have Books Online? If so (it's included free with SQL Server), open it up and go to the Index tab. Type in "logins-SQL Server" and start reading. It will give you more than enough information to accomplish this task. You can also type in the stored procedures he gave you to get syntax and usage information.|||oh why use the reference material. I drove for a couple of years without a license when I was a kid.|||Hi Guys,

No, I don't have Books Online..

Justi moving around with the help of you people...

I attached jpg image to give you a clear pic to know whats wrong..

With kind regards,

Ashfaque|||Hello Gentlemen,

I am still waiting for your valuable response..

With kind regards,

Ashfaque

Wednesday, March 7, 2012

msdb(Suspect)

My Sql server msdb database demaged.
I did not backuped it before.
I copy the msdbdata.mdf and msdblog.ldf from other SQL database.
But not working.
How can I fix it
ThankHi Chen,
Search for << msdb database marked as "suspect" >> in this forum. And you
should be able to get the answer.
Also check this out: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=33914
Thanks
GYK

msdb(Suspect)

My Sql server msdb database demaged.
I did not backuped it before.
I copy the msdbdata.mdf and msdblog.ldf from other SQL database.
But not working.
How can I fix it
Thank
Hi Chen,
Search for << msdb database marked as "suspect" >> in this forum. And you
should be able to get the answer.
Also check this out: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=33914
Thanks
GYK

msdb(Suspect)

My Sql server msdb database demaged.
I did not backuped it before.
I copy the msdbdata.mdf and msdblog.ldf from other SQL database.
But not working.
How can I fix it
ThankHi Chen,
Search for << msdb database marked as "suspect" >> in this forum. And you
should be able to get the answer.
Also check this out: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=33914
--
Thanks
GYK