Link to home
Start Free TrialLog in
Avatar of Ann K
Ann K

asked on

Copy tables or databases

How to I copy database files or tables from one sql server 2008 to another same version.
SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K
Ann K

ASKER

How to I do that?

>If you want to copy the entire DB then you can just take full back up of the existing one and then restore it on the database .
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

How to I restore tables  from master database? I tried but it gives error.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

It doesn't shows restore database in the drop down;
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Its not showing master in the list.
User generated image
Do you want to restore the master DB?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

SYNTAX ERROR.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

still getting error.
User generated imageUser generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Now its a different error.
User generated image
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

I tried it but it gives that error.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Looks like this time it works. I have to close the ssms and restart it again.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Also something is going on with the sql server. I am going to take that off from the properties inside the configuration manager.
User generated image
Avatar of Ann K

ASKER

I take it off from the parameter list but now the service don't want to start.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Its not starting
User generated image
Avatar of Ann K

ASKER

where it create the log file?
Avatar of Ann K

ASKER

2017-10-14 18:33:53.03 Server      Microsoft SQL Server 2008 (SP3) - 10.0.5538.0 (Intel X86) 
	Apr  3 2015 14:53:57 
	Copyright (c) 1988-2008 Microsoft Corporation
	Express Edition on Windows NT 6.1 <X86> (Build 7601: Service Pack 1)

2017-10-14 18:33:53.03 Server      (c) 2005 Microsoft Corporation.
2017-10-14 18:33:53.03 Server      All rights reserved.
2017-10-14 18:33:53.03 Server      Server process ID is 4872.
2017-10-14 18:33:53.03 Server      System Manufacturer: 'Dell Inc.', System Model: 'Latitude D620'.
2017-10-14 18:33:53.03 Server      Authentication mode is WINDOWS-ONLY.
2017-10-14 18:33:53.03 Server      Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2017-10-14 18:33:53.03 Server      This instance of SQL Server last reported using a process ID of 1724 at 10/14/2017 6:33:38 PM (local) 10/14/2017 11:33:38 PM (UTC). This is an informational message only; no user action is required.
2017-10-14 18:33:53.04 Server      Registry startup parameters: 
	 -d c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf
	 -e c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG
	 -l c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2017-10-14 18:33:53.06 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-14 18:33:53.06 Server      Detected 2 CPUs. This is an informational message; no user action is required.
2017-10-14 18:33:53.08 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2017-10-14 18:33:53.12 Server      Node configuration: node 0: CPU mask: 0x00000003 Active CPU mask: 0x00000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-14 18:33:53.16 spid5s      Starting up database 'master'.
2017-10-14 18:33:53.65 spid5s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2017-10-14 18:33:53.73 spid5s      SQL Trace ID 1 was started by login "sa".
2017-10-14 18:33:53.78 spid5s      Starting up database 'mssqlsystemresource'.
2017-10-14 18:33:53.83 spid5s      The resource database build version is 10.00.5500. This is an informational message only. No user action is required.
2017-10-14 18:33:54.12 spid5s      Error: 15466, Severity: 16, State: 1.
2017-10-14 18:33:54.12 spid5s      An error occurred during decryption.
2017-10-14 18:33:54.23 spid10s     Starting up database 'model'.
2017-10-14 18:33:54.23 spid10s     Error: 17204, Severity: 16, State: 1.
2017-10-14 18:33:54.23 spid10s     FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\model.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
2017-10-14 18:33:54.23 spid10s     Error: 5120, Severity: 16, State: 101.
2017-10-14 18:33:54.23 spid10s     Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\model.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
2017-10-14 18:33:54.24 spid10s     Error: 17207, Severity: 16, State: 1.
2017-10-14 18:33:54.24 spid10s     FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2017-10-14 18:33:54.24 spid10s     File activation failure. The physical file name "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\modellog.ldf" may be incorrect.
2017-10-14 18:33:54.24 spid10s     Error: 945, Severity: 14, State: 2.
2017-10-14 18:33:54.24 spid10s     Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2017-10-14 18:33:54.24 spid10s     Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2017-10-14 18:33:54.24 spid10s     SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2017-10-14 18:33:54.31 spid5s      Server name is 'KATHLEENA2-PC'. This is an informational message only. No user action is required.
2017-10-14 18:33:54.31 spid5s      Informational: No full-text supported languages found.
2017-10-14 18:33:54.31 spid5s      Starting up database 'msdb'.
2017-10-14 18:33:54.33 spid5s      Error: 17204, Severity: 16, State: 1.
2017-10-14 18:33:54.33 spid5s      FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
2017-10-14 18:33:54.33 spid5s      Error: 5120, Severity: 16, State: 101.
2017-10-14 18:33:54.33 spid5s      Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf". Operating system error 3: "3(The system cannot find the path specified.)".

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Is there something  I am missing.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

From another SQL Server 2008
Avatar of Ann K

ASKER

User generated image
Avatar of Ann K

ASKER

is it possible to revert it?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

I dont have a backup file of this server.
Avatar of Ann K

ASKER

Is it possible to do any repair?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

They all looks like the same

c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLServer\MSSQL\DATA

c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA

c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Yes I create it and copy all the files their.
Avatar of Ann K

ASKER

User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Same error.
User generated image
what is error in error log.
Avatar of Ann K

ASKER

2017-10-14 20:13:39.68 Server      Microsoft SQL Server 2008 (SP3) - 10.0.5538.0 (Intel X86) 
	Apr  3 2015 14:53:57 
	Copyright (c) 1988-2008 Microsoft Corporation
	Express Edition on Windows NT 6.1 <X86> (Build 7601: Service Pack 1)

2017-10-14 20:13:39.68 Server      (c) 2005 Microsoft Corporation.
2017-10-14 20:13:39.68 Server      All rights reserved.
2017-10-14 20:13:39.68 Server      Server process ID is 244.
2017-10-14 20:13:39.68 Server      System Manufacturer: 'Dell Inc.', System Model: 'Latitude D620'.
2017-10-14 20:13:39.68 Server      Authentication mode is WINDOWS-ONLY.
2017-10-14 20:13:39.68 Server      Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2017-10-14 20:13:39.68 Server      This instance of SQL Server last reported using a process ID of 4736 at 10/14/2017 7:57:43 PM (local) 10/15/2017 12:57:43 AM (UTC). This is an informational message only; no user action is required.
2017-10-14 20:13:39.69 Server      Registry startup parameters: 
	 -d c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf
	 -e c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG
	 -l c:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2017-10-14 20:13:39.73 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-14 20:13:39.73 Server      Detected 2 CPUs. This is an informational message; no user action is required.
2017-10-14 20:13:39.86 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2017-10-14 20:13:39.93 Server      Node configuration: node 0: CPU mask: 0x00000003 Active CPU mask: 0x00000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-14 20:13:39.98 spid6s      Starting up database 'master'.
2017-10-14 20:13:40.46 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2017-10-14 20:13:40.61 spid6s      SQL Trace ID 1 was started by login "sa".
2017-10-14 20:13:40.62 spid6s      Starting up database 'mssqlsystemresource'.
2017-10-14 20:13:40.64 spid6s      The resource database build version is 10.00.5500. This is an informational message only. No user action is required.
2017-10-14 20:13:40.84 spid6s      Error: 15466, Severity: 16, State: 1.
2017-10-14 20:13:40.84 spid6s      An error occurred during decryption.
2017-10-14 20:13:40.93 spid10s     Starting up database 'model'.
2017-10-14 20:13:40.94 spid10s     Error: 17204, Severity: 16, State: 1.
2017-10-14 20:13:40.94 spid10s     FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\model.mdf for file number 1.  OS error: 5(Access is denied.).
2017-10-14 20:13:40.97 spid6s      Server name is 'KATHLEENA2-PC'. This is an informational message only. No user action is required.
2017-10-14 20:13:41.04 spid10s     Error: 5120, Severity: 16, State: 101.
2017-10-14 20:13:41.04 spid10s     Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\model.mdf". Operating system error 5: "5(Access is denied.)".
2017-10-14 20:13:41.13 spid6s      Informational: No full-text supported languages found.
2017-10-14 20:13:41.13 spid6s      Starting up database 'msdb'.
2017-10-14 20:13:41.13 spid10s     Error: 17204, Severity: 16, State: 1.
2017-10-14 20:13:41.13 spid10s     FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\modellog.ldf for file number 2.  OS error: 5(Access is denied.).
2017-10-14 20:13:41.14 spid10s     Error: 5120, Severity: 16, State: 101.
2017-10-14 20:13:41.14 spid10s     Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\modellog.ldf". Operating system error 5: "5(Access is denied.)".
2017-10-14 20:13:41.14 spid10s     Error: 5105, Severity: 16, State: 1.
2017-10-14 20:13:41.14 spid10s     A file activation error occurred. The physical file name 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\modellog.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
2017-10-14 20:13:41.19 spid10s     Error: 945, Severity: 14, State: 2.
2017-10-14 20:13:41.19 spid10s     Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2017-10-14 20:13:41.19 spid10s     Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2017-10-14 20:13:41.19 spid6s      Error: 17204, Severity: 16, State: 1.
2017-10-14 20:13:41.19 spid6s      FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf for file number 1.  OS error: 5(Access is denied.).
2017-10-14 20:13:41.19 spid10s     SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2017-10-14 20:13:41.19 spid6s      Error: 5120, Severity: 16, State: 101.
2017-10-14 20:13:41.19 spid6s      Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf". Operating system error 5: "5(Access is denied.)".
2017-10-14 20:13:41.20 spid6s      Error: 17204, Severity: 16, State: 1.
2017-10-14 20:13:41.20 spid6s      FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf for file number 2.  OS error: 5(Access is denied.).
2017-10-14 20:13:41.21 spid6s      Error: 5120, Severity: 16, State: 101.
2017-10-14 20:13:41.21 spid6s      Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf". Operating system error 5: "5(Access is denied.)".
2017-10-14 20:13:41.21 spid6s      Error: 5105, Severity: 16, State: 1.
2017-10-14 20:13:41.21 spid6s      A file activation error occurred. The physical file name 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

I know the old way in dos attrib -r -a -s -h

I don't know how to check permissions in windows?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ann K

ASKER

Thank You.