Wednesday, March 21, 2012
Diff Result Between SQL 7 & SQL 2000
When I execute the following sql statement in SQL 2000 DTS or query analyzer, I received the following error message. I used [ ] because my field names have spaces in between.
The same sql statement ran perfect in SQL 7. What could be wrong? Please advise. Thanks a million.
Update SAPvsSQL set [Sales Organisation] = sales_org,
[Value Out By] = val_diff, [Qty Out By] = qty_diff
Error message:
Server: Msg 16882, Level 11, State 1, Procedure sp_runwebtask, Line ...
SQL Web Assistant: Web task not found. Verify the name of the name for possible errors.
Best regardsYou sure you just didn't execute all of the code in the QA window, and you're executing something you don't see?|||And also, what are you setting the columns to?
Those aren't local variables...is there more to the statement?|||Originally posted by Brett Kaiser
And also, what are you setting the columns to?
Those aren't local variables...is there more to the statement?
Hi,
Thank you for your email reply.
Those in [ ] were actual field names in my database table. I used them for display purposes so instead of showing Sales_organation, I display Sales Organisation, Value Out By instead of val_diff and finally Qty Out By instead of qty_diff (look more meanful to the users).
You are right that I didn't show all the script in my previous message because they worked ok until this line. I am just being curious why the same script work PERFECT in SQL 7 but not in SQL 2000. I have been running this same set of script for more than a year and still running fine as at this morning. Reason why I am trying it on SQL 2000 because we will be moving to SQL 2000 totally by end this month.|||No problems here...your doing something else wrong...
USE Northwind
GO
CREATE TABLE SAPvsSQL (
[Sales Organisation] varchar(10)
, [Value Out By] varchar(10)
, [Qty Out By] varchar(10)
)
GO
DECLARE @.Sales_Org varchar(10), @.val_diff varchar(10), @.qty_diff varchar(10)
SELECT @.Sales_Org = 'A', @.val_Diff = 'B', @.qty_diff = 'C'
INSERT INTO SAPvsSQL ([Sales Organisation], [Value Out By], [Qty Out By])
SELECT 'X', 'Y', 'Z'
SELECT * FROM SAPvsSQL
UPDATE SAPvsSQL
SET [Sales Organisation] = @.sales_org
, [Value Out By] = @.val_diff
, [Qty Out By] = @.qty_diff
SELECT * FROM SAPvsSQL
GO
DROP TABLE SAPvsSQL
GO
Didn't show part of rows at subscriber
I'm confuse knowing that some rows didn't replicated to subscriber. No error, no message, no idea at all.
Is there any workaround to do? I'm not sure to have resnapshot because of the large data and long distance site.
I'm using simple merge replication. No filter or any modified things.
Pls help.
TIA
Echo,
I've seen this in 2 circumstances. Firstly when the filter was set to 1=2
and inserts were made while the merge agent was running and secondly when a
bulk insert was carried out without firing the triggers.
To fix the extra rows that haven't been replicated, there are 2 different
procedures (details in BOL):
SP_MERGEDUMMYUPDATE
SP_ADDTABLETOCONTENTS
HTH,
Paul Ibison
|||>Firstly when the filter was set to 1=2 and inserts were made while the merge agent was running
- I don't have any idea. No filter at all.
>secondly when a bulk insert was carried out without firing the triggers
- Do you mean the triggers those made by replication? why didn't they fire?
Still don't know how to use sp_mergedummyupdate or sp_addtabletocontents.
What to fill in the parameters?
Thanks a lot Paul

"Paul Ibison" wrote:
> Echo,
> I've seen this in 2 circumstances. Firstly when the filter was set to 1=2
> and inserts were made while the merge agent was running and secondly when a
> bulk insert was carried out without firing the triggers.
> To fix the extra rows that haven't been replicated, there are 2 different
> procedures (details in BOL):
> SP_MERGEDUMMYUPDATE
> SP_ADDTABLETOCONTENTS
> HTH,
> Paul Ibison
>
>
|||Echo,
The triggers I was referring to are the replication triggers. On an insert,
a record should be entered into MSmerge_contents and this is done using a
trigger. The trigger won't fire on a bulk insert (by default).
The dummy update takes 2 arguments - the tablename and the guid of the row
which didn't replicate and works for single
rows(http://msdn.microsoft.com/library/de...y/en-us/tsqlre
f/ts_sp_repl3_7r6t.asp).
Sp_addtabletocontents will do this work for an entire table
(http://msdn.microsoft.com/library/de...-us/tsqlref/ts
_sp_repl_05wz.asp) and just has the table and owner as arguments.
In each case, doing the synchronization afterwards is necessary.
HTH,
Paul Ibison
Monday, March 19, 2012
Did anyone get this error on a backup job?!
In my DB Backup JOB my first step is to map a network path like this
NET USE Z:\\SERVER2\DADOS /user somebody 234567
I got this Error --> Executed as user: MYSERVER\SYSTEM. System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated. Process Exit Code 2. The step failed.
In step 2 i copy all my *.bak files from yesterday to the drive mapped on dir BACKUP in SERVER2.
COPY "C:\BACKUP\*.BAK" "Z:\BACKUP\"
I got this Error --> Executed as user: MYSERVER\SYSTEM. ...annot find the path specified. C:\BACKUP\db_200511030200.BAK The system cannot find the path specified. C:\BACKUP\CFG_db_200511030225.BAK The system cannot find the path specified. C:\BACKUP\STRUCTAL_db_200511030225.BAK The system cannot find the path specified. C:\BACKUP\STRUCTEN_db_200511030225.BAK The system cannot find the path specified.
step 3 i delete all files in MYSERVER C:\BACKUP\*.BAK
This step is OK
step 4 i execute my database maintenance plan
the .bak file are generated and put in "C:\BACKUPS" in MYSERVER
This step is OK
Thanks for all help.First you need to resolve the 1312 error. It may be caused by some sort of delay that occurred between a network connection request initiated by NET USE and the actuaql attempt to map the drive. While on the topic, why do you need to map the drive to begin with?
Second, you need to make sure that the step is executed successfully before moving on. You need to either check for errorlevel or take the step out of the batch and put it by itself into a separate step within the job, and then allow continuation OnSuccess.
DialogError message type
Hi There
In my testing i have seen the following i just would like confirmation that i am correct.
When something happens to cause a Dialog Error say for example message validation fails.
I have noticed that the actual DialogError message always goes to the initiator queue, is this correct ?
If so then logic to handle the ErrorDialog message type only has to be in the initiator activated SP that logic is not required in the target queue activated SP since the ErrorDialog message always goes to the initiator queue, is that correct ?
Thanx
Both sides need to be prepared to deal with the error message. The same message validation can fail for a message sent on the other direction, or the initiator code can issue an explicit END CONVERSATION ... WITH ERROR (or even an ALTER DATABASE ... SET ERROR_BROKER_CONVERSATIONS), or the initiator can drop the contract used on the conversation, or the service. All these result in an error message being sent to the target, and the list is not complete.
HTH,
~ Remus
Sunday, March 11, 2012
Diagramming Error?
I created a diagram. Via the diagramming tool, I added a new table. Added some columns. Decided I didn't like it. Deleted the table from the database.
Later I decided I did want the table. So I tried to create it again, but the diagram tool said that the table is make for deletion and couldn't be added. I looked at the table list and it was not there.
What can I do so that I can create another table with the same name?Hi Jim,
I could reproduce your results if I deleted the table before saving the diagram. Essentially the table never gets added to the database, but the diagram tool has the name recorded somewhere and that cache isn't getting cleared. I've filed a bug on your behalf for this incorrect behavior.
As a work around, you should be able to reuse the table name if you close SQL Server Management Studio, reopen SSMS and then modify the diagram.|||Thank you!
Friday, March 9, 2012
Devide by zero error
I have sql statement that cast two date range into decimal and then devive
by one another.
When I compile this code I get error: Source: Microsoft OLE DB provider for
sql
Error desc: Devide by zero error encountered.
How would I resolve this issue?Please disregard. I found a thread that already had the answer.
search for : Divide by Zero
"ITDUDE27" wrote:
> help please.
> I have sql statement that cast two date range into decimal and then devive
> by one another.
> When I compile this code I get error: Source: Microsoft OLE DB provider fo
r
> sql
> Error desc: Devide by zero error encountered.
> How would I resolve this issue?
device is ambiguous in the namespace microsoft.directx.direc3d
I have checked and double checked that I have all the necessary references and includes. Obviously I am missing something.
Thanks Dick
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Public Class Form1
Inherits System.Windows.Forms.Form
Dim device As Device ' Our rendering device
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Required by the Windows Form Designer
#End Region
Public Function InitializeGraphics() As Boolean
Try
' Now let's setup our D3D stuff
Dim presentParams As PresentParameters = New PresentParameters()
presentParams.Windowed = True
presentParams.SwapEffect = SwapEffect.Discard
device = New Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams)
Return True
Catch
Return False
End Try
End Function
Private Sub Render()
If device Is Nothing Then
Exit Sub
End If
'Clear the backbuffer to a blue color
device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0F, 0)
'Begin the scene
device.BeginScene()
' Rendering of scene objects can happen here
'End the scene
device.EndScene()
device.Present()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not InitializeGraphics() Then
MessageBox.Show("Could not initialize Direct3D. This tutorial will exit.")
Exit Sub
End If
Me.Show()
' While the form is still valid, render and process messages
Do While Me.Created
Render()
Application.DoEvents()
Loop
End Sub
End Class
This is a SQL Server forum. I think you've accidentally posted to the wrong place...Wednesday, March 7, 2012
device is ambiguous in the namespace microsoft.directx.direc3d
I have checked and double checked that I have all the necessary references and includes. Obviously I am missing something.
Thanks Dick
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Public Class Form1
Inherits System.Windows.Forms.Form
Dim device As Device ' Our rendering device
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Required by the Windows Form Designer
#End Region
Public Function InitializeGraphics() As Boolean
Try
' Now let's setup our D3D stuff
Dim presentParams As PresentParameters = New PresentParameters()
presentParams.Windowed = True
presentParams.SwapEffect = SwapEffect.Discard
device = New Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams)
Return True
Catch
Return False
End Try
End Function
Private Sub Render()
If device Is Nothing Then
Exit Sub
End If
'Clear the backbuffer to a blue color
device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0F, 0)
'Begin the scene
device.BeginScene()
' Rendering of scene objects can happen here
'End the scene
device.EndScene()
device.Present()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not InitializeGraphics() Then
MessageBox.Show("Could not initialize Direct3D. This tutorial will exit.")
Exit Sub
End If
Me.Show()
' While the form is still valid, render and process messages
Do While Me.Created
Render()
Application.DoEvents()
Loop
End Sub
End Class
This is a SQL Server forum. I think you've accidentally posted to the wrong place...Device error or device off-line. ?
Hi to All
when i m trying to execute following code
backup database web
to disk = 'c:\inetpub\wwwroot\backup\mybakup.bak'
with format
I m Getting Error like :
Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'c:\inetpub\wwwroot\backup\mybakup.bak'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
This error is Generated only when i m trying to access folders within "wwwroot" but not in any other folders , even command runs success fully for "wwwroot" folder . !!
but not for any subfolders of wwwroot.
Can Any One Help Me ?
Please follow the post in the other group, you don′t have to mulitpost as we the groups are all monitored.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Device error or device off-line ?
Hi to All
when i m trying to execute following code
backup database web
to disk = 'c:\inetpub\wwwroot\backup\mybakup.bak'
with format
I m Getting Error like :
Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'c:\inetpub\wwwroot\backup\mybakup.bak'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
This error is Generated only when i m trying to access folders within "wwwroot" but not in any other folders , even command runs success fully for "wwwroot" folder . !!
but not for any subfolders of wwwroot.
Can Any One Help Me ?
What does show
xp_cmdshell "dir c:\inetpub\wwwroot\backup"
?
|||DO the subfolders inherit the permission from the wwwroot folder ? Make sure that this isn′t a permission problem. What does (like the message says the error log tell you about the problem?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||i m using Sql Server 2000 (sp3);
command
xp_cmdshell "dir c:\inetpub\wwwroot\backup"
gives following error:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'xp_cmdshell'.
All Permission have been set properly.
but error is still as it is.
|||the xp_cmdshell is located in the master database, so you have to prefix the database name or need to have your curretn context in the master database.
master.xp_cmdshell "dir c:\inetpub\wwwroot\backup"
or
Use master
GO
xp_cmdshell "dir c:\inetpub\wwwroot\backup"
HTH, JEns Suessmeyer.
http://www.sqlserver2005.de
Hi,
sometime people think that the path within any TSQL commands can be also used locally, so if you are working in a client server scenario and you issue the command BACKUP DATABASE with some path and filename (with absolute drive letters), the drive letters apply to the server not the client. If you want to reach a destination on the client machine, you have to copy it via a UNC share.
Don′t know if that applies to you, just to let you know. If this is not the case, please see if the listing of the directory comes back with a listing of files (then it really HAS to be a permission problem) or it comes back with an error that the directory doesn′t exists.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Device activation error problem, Index file missing
I have a big problem. One of the disks in RAID 5 array went dead, and
our costumer's administrator tried to fix the problem, which he did, in
the end, but thet ment that all the data on that partition was lost. A
great way to fix the problem, don't you think? Unfortunately, on that
partition there was Index_data.ndf, file that I used for all the
indexes in my database, all the data is in the other file, on the other
partition. There's no backup bacause the database size is about 500GB:(
Now, database is in suspect mode, of course, and I'm thinking about my
options. I know there's a way to put database back from suspect mode
and transport the data using DTS or something to another db, but I'd
really love to skip the part where I get to transport manually 300 GB
of data from one db to another.
What I want to know is this: is there a way to delete indexes from
tables in database, or to delete the index file from database
properties so I could start database again, recreate index file and
recreate indexes?
Any halp is appreciated...
Regards,
MarkoOf course database size does not deteremine backups. Have them buy idera or
redgate. I backed up a 600GB DB to 20GB file with both, no fuss no muss.
On to your problem. Is this 2000? You can reset the suspect flag with
sp_resetstatus. Barring any other options, I would use that proc and then
try to get a backup even if you have to download red-gates eval tool. If you
have a good backup, attempt to drop all indexes located on the now missing
partition by generating a script or turning on ad-hoc updates to system
tables(2k only) and attempting to drop them from there(sysindexes). if you
can't get a reliable backup(ensure you can restore it before doing anything
permanent) once you have the db out of suspect mode, you might have to force
table scans wth queries to get data out as the missing indexes could play
hell with the optimizer and any tool you choose. Red-gate's suite may also
help here, saving you some legwork.
Lastly, slap the admin.
"Marko.Sunjic@.gmail.com" wrote:
> Hi, everybody.
> I have a big problem. One of the disks in RAID 5 array went dead, and
> our costumer's administrator tried to fix the problem, which he did, in
> the end, but thet ment that all the data on that partition was lost. A
> great way to fix the problem, don't you think? Unfortunately, on that
> partition there was Index_data.ndf, file that I used for all the
> indexes in my database, all the data is in the other file, on the other
> partition. There's no backup bacause the database size is about 500GB:(
> Now, database is in suspect mode, of course, and I'm thinking about my
> options. I know there's a way to put database back from suspect mode
> and transport the data using DTS or something to another db, but I'd
> really love to skip the part where I get to transport manually 300 GB
> of data from one db to another.
> What I want to know is this: is there a way to delete indexes from
> tables in database, or to delete the index file from database
> properties so I could start database again, recreate index file and
> recreate indexes?
> Any halp is appreciated...
> Regards,
> Marko
>
Device activation error
I'm attempting to upgrade from MSDE 1.0 to MSDE 2000. However, before
removing MSDE 1.0, a database apparently was not properly detached after
attempting to attach (using sp_attach_db not attach w/ single file) this very
database to MSDE 2000.
The following error is rec'd:
"Can not create file C:\Program Files...\MyData.LDF because it already
exists.
Could not open new database "MyData". CREATE DATABASE is aborted.
Device activation error. The physical file name "C:\MSSQL7\Data\MyData.LDF
may be incorrect."
Should I attempt to place the log file back to its old location, restore the
database and then detach or should I try to shrink the file and truncate the
log?
Just want to know before I further screw things up.
any help is appreciated.
Hello,
If you have the latest backup then RESTORE the DATABASe using RESTORE
DATABASE WITH MOVE options..Try restoring using a new name and make sure
that
dataBase backup is good.
Thanks
Hari
"jim" <jim@.discussions.microsoft.com> wrote in message
news:F3BE2646-3666-40C7-AF83-763ED47957B2@.microsoft.com...
> Hello,
> I'm attempting to upgrade from MSDE 1.0 to MSDE 2000. However, before
> removing MSDE 1.0, a database apparently was not properly detached after
> attempting to attach (using sp_attach_db not attach w/ single file) this
> very
> database to MSDE 2000.
> The following error is rec'd:
> "Can not create file C:\Program Files...\MyData.LDF because it already
> exists.
> Could not open new database "MyData". CREATE DATABASE is aborted.
> Device activation error. The physical file name "C:\MSSQL7\Data\MyData.LDF
> may be incorrect."
> Should I attempt to place the log file back to its old location, restore
> the
> database and then detach or should I try to shrink the file and truncate
> the
> log?
> Just want to know before I further screw things up.
> any help is appreciated.
>
|||Hi Hari,
Thanks for the response. I just have one more question. With the new
database name, does this mean that the existing database name can no longer
be used on this computer? Or, once the database is restored, I can detach the
database w/ the new database name and then attach the database w/ the old
name in the new location? Hopefully, this question isn't too silly.
your help is appreciated.
"Hari Prasad" wrote:
> Hello,
> If you have the latest backup then RESTORE the DATABASe using RESTORE
> DATABASE WITH MOVE options..Try restoring using a new name and make sure
> that
> dataBase backup is good.
> Thanks
> Hari
> "jim" <jim@.discussions.microsoft.com> wrote in message
> news:F3BE2646-3666-40C7-AF83-763ED47957B2@.microsoft.com...
>
>
Device Activation Error
I have deployed a new SQL server and I have installed SP4, I have tried to
restore my old dbase using restore from device and I choosed the dbase file
name. I got the following error (Device activiation error. The physical name
'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
location for the file.
Please helpppp
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
> Dear All,
> I have deployed a new SQL server and I have installed SP4, I have tried to
> restore my old dbase using restore from device and I choosed the dbase
> file
> name. I got the following error (Device activiation error. The physical
> name
> 'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
> location for the file.
> Please helpppp
This means that one or more of the files the database is being restored to
already exists. Check the file name. If a file exists there, you might
want to rename it. Or, as the message indicates, use RESTORE ... WITH MOVE.
David
|||Hi David,
The files aren't there and I even tried to renave the dbase and the log file
but it didn't work. USE WITH MOVE it was in the warning message and I can't
find it at all in the restore options.
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|
"David Browne" wrote:
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
>
> This means that one or more of the files the database is being restored to
> already exists. Check the file name. If a file exists there, you might
> want to rename it. Or, as the message indicates, use RESTORE ... WITH MOVE.
> David
>
>
|||> USE WITH MOVE it was in the warning message and I can't
> find it at all in the restore options.
Below is a Transact-SQL example of the MOVE option David suggested. The
drives/folders must exist but the file must not.
RESTORE DATABASE MyDatabase
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'E:\DataFiles\\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'F:\LogFiles\\MyDatabase_Log.ldf'
You can list the logical file names needed for the MOVE option with RESTORE
FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
Hope this helps.
Dan Guzman
SQL Server MVP
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:0B29F43E-C8ED-4B4B-B93E-5F85EE0DBF6A@.microsoft.com...[vbcol=seagreen]
> Hi David,
> The files aren't there and I even tried to renave the dbase and the log
> file
> but it didn't work. USE WITH MOVE it was in the warning message and I
> can't
> find it at all in the restore options.
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--|
>
> "David Browne" wrote:
Device Activation Error
I have deployed a new SQL server and I have installed SP4, I have tried to
restore my old dbase using restore from device and I choosed the dbase file
name. I got the following error (Device activiation error. The physical name
'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
location for the file.
Please helpppp
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
> Dear All,
> I have deployed a new SQL server and I have installed SP4, I have tried to
> restore my old dbase using restore from device and I choosed the dbase
> file
> name. I got the following error (Device activiation error. The physical
> name
> 'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
> location for the file.
> Please helpppp
This means that one or more of the files the database is being restored to
already exists. Check the file name. If a file exists there, you might
want to rename it. Or, as the message indicates, use RESTORE ... WITH MOVE.
David|||Hi David,
The files aren't there and I even tried to renave the dbase and the log file
but it didn't work. USE WITH MOVE it was in the warning message and I can't
find it at all in the restore options.
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|
"David Browne" wrote:
> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
> message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
> > Dear All,
> >
> > I have deployed a new SQL server and I have installed SP4, I have tried to
> > restore my old dbase using restore from device and I choosed the dbase
> > file
> > name. I got the following error (Device activiation error. The physical
> > name
> > 'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
> > location for the file.
> >
> > Please helpppp
>
> This means that one or more of the files the database is being restored to
> already exists. Check the file name. If a file exists there, you might
> want to rename it. Or, as the message indicates, use RESTORE ... WITH MOVE.
> David
>
>|||> USE WITH MOVE it was in the warning message and I can't
> find it at all in the restore options.
Below is a Transact-SQL example of the MOVE option David suggested. The
drives/folders must exist but the file must not.
RESTORE DATABASE MyDatabase
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'E:\DataFiles\\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'F:\LogFiles\\MyDatabase_Log.ldf'
You can list the logical file names needed for the MOVE option with RESTORE
FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
message news:0B29F43E-C8ED-4B4B-B93E-5F85EE0DBF6A@.microsoft.com...
> Hi David,
> The files aren't there and I even tried to renave the dbase and the log
> file
> but it didn't work. USE WITH MOVE it was in the warning message and I
> can't
> find it at all in the restore options.
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--|
>
> "David Browne" wrote:
>> "Ibrahim Awwad" <ibrahim_awwad(at)hotmail(dot)com(antispam)> wrote in
>> message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
>> > Dear All,
>> >
>> > I have deployed a new SQL server and I have installed SP4, I have tried
>> > to
>> > restore my old dbase using restore from device and I choosed the dbase
>> > file
>> > name. I got the following error (Device activiation error. The physical
>> > name
>> > 'old dbase file path' ma be incorrect). Use WITH MOVE to identify a
>> > valid
>> > location for the file.
>> >
>> > Please helpppp
>>
>> This means that one or more of the files the database is being restored
>> to
>> already exists. Check the file name. If a file exists there, you might
>> want to rename it. Or, as the message indicates, use RESTORE ... WITH
>> MOVE.
>> David
>>
Device Activation Error
I have set of stored procedures in SQL 7.0. They are all encrypted. I moved the whole set to SQL 2K. I took a backup of the SQL 7.0 version and put it in SQL 2K. Now, when I run the stored procedure in SQL 2K, I am getting an error as "Device Activation Error". This is happening when I run a stored procedure which is creating a new database and I am giving the MDF and LDF names as parameters. I have not met with any success in SQL Books. Please enlighten...
Thanks,
SrinidhiOriginally posted by srinidhiv
Hi,
I have set of stored procedures in SQL 7.0. They are all encrypted. I moved the whole set to SQL 2K. I took a backup of the SQL 7.0 version and put it in SQL 2K. Now, when I run the stored procedure in SQL 2K, I am getting an error as "Device Activation Error". This is happening when I run a stored procedure which is creating a new database and I am giving the MDF and LDF names as parameters. I have not met with any success in SQL Books. Please enlighten...
Thanks,
Srinidhi
what do you mean by encrypted stored procedures ?
if you could post the code ,it could be more helpful.|||Does the stored procedure works fine in SQLServer7.0 ?|||So your SP is encrypted. It is written with incompatible MSSQL7 syntax.
You can simply decrypt it. MSSQL2K encryption is weak.
Get permitions to rewrite SP from developer and look at I-net.
Device activation error
Hi All,
Currently I have a PC that has MSDE installed on it and is attached to database (MyData.MDF and a log file MYLog.LDF) located on its hard drive at c:\data\.When I detach from the database, place a copy of the two files noted above on my networkdrive @. u:\data and try to attach I get the following error’s:
SQL[1] exec error = -1: Changed database context to 'master'.
“Device activation error. The physical file name u:\data\MyData.MDF may be incorrect.”
I have done some testing a have found that I can attach to a copy of my database if I move it anywhere on the c: drive, and or even to a 1Gb USB key attached to the system(e:\).So far it seems to only be an issue if I move it to a mapped network drive.If anyone could please provide me with any info it would be greatly appreciated.
Thanks.
James D.
First, your data must be stored on an approved network server/storage you want to be supported. Second, you will have to use a special trace flag to force sqlserver to mount a networked db file. See the following article:
http://support.microsoft.com/kb/304261|||
It's because your U: drive isn't a local drive. By default, it's not support to place data files on mapped shares or UNC paths. You can find more information in the following article:
Description of support for network database files in SQL Server
http://support.microsoft.com/?id=304261
-Sue
|||Excellent, thank you for the response.
After I use the trace flag mentioned and get my MS SQL Server Desktop Engine to mount to the networked db files, will it be possible to have a second PC with MS SQL Server Desktop Engine also installed on it to connect to the same networked DB files at the same time as the first unit, or will it be limited to just one PC at a time due to file locks? We require that at least two units(possibly up to 3 more in the future) can all share, write, and read to same networked db files at the same time. If you could please let me know when you have a moment it would be great.
Thanks.
James D.
|||Sqlserver is a shared nothing technology. I.e. only one instance can access the data at any time. So, no, you cannot have another server hits that network database file(s). As it stands, unless your hardware is part of the qualified HCL, you're running in an unsupported platform.
Btw, sqlserver has a feature called Scalable Shared Database (SSD) which allows multiple instances to share the same database file. However, this requires a SAN.
Device Activation Error
I have deployed a new SQL server and I have installed SP4, I have tried to
restore my old dbase using restore from device and I choosed the dbase file
name. I got the following error (Device activiation error. The physical name
'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
location for the file.
Please helpppp
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
> Dear All,
> I have deployed a new SQL server and I have installed SP4, I have tried to
> restore my old dbase using restore from device and I choosed the dbase
> file
> name. I got the following error (Device activiation error. The physical
> name
> 'old dbase file path' ma be incorrect). Use WITH MOVE to identify a valid
> location for the file.
> Please helpppp
This means that one or more of the files the database is being restored to
already exists. Check the file name. If a file exists there, you might
want to rename it. Or, as the message indicates, use RESTORE ... WITH MOVE.
David|||Hi David,
The files aren't there and I even tried to renave the dbase and the log file
but it didn't work. USE WITH MOVE it was in the warning message and I can't
find it at all in the restore options.
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|--|
|Islam is peace not Terror|
|--|
"David Browne" wrote:
> "Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
> message news:0AEA8F49-A25F-4DAC-B150-818FC9E94B99@.microsoft.com...
>
> This means that one or more of the files the database is being restored to
> already exists. Check the file name. If a file exists there, you might
> want to rename it. Or, as the message indicates, use RESTORE ... WITH MOV
E.
> David
>
>|||> USE WITH MOVE it was in the warning message and I can't
> find it at all in the restore options.
Below is a Transact-SQL example of the MOVE option David suggested. The
drives/folders must exist but the file must not.
RESTORE DATABASE MyDatabase
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'E:\DataFiles\\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'F:\LogFiles\\MyDatabase_Log.ldf'
You can list the logical file names needed for the MOVE option with RESTORE
FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
Hope this helps.
Dan Guzman
SQL Server MVP
"Ibrahim Awwad" < ibrahim_awwad(at)hotmail(dot)com(antispa
m)> wrote in
message news:0B29F43E-C8ED-4B4B-B93E-5F85EE0DBF6A@.microsoft.com...[vbcol=seagreen]
> Hi David,
> The files aren't there and I even tried to renave the dbase and the log
> file
> but it didn't work. USE WITH MOVE it was in the warning message and I
> can't
> find it at all in the restore options.
> --
> *********
> IT Manager
> DeLaval Ltd.
> Cairo-Egypt
> *********
> |--|
> |Islam is peace not Terror|
> |--|
>
> "David Browne" wrote:
>
Saturday, February 25, 2012
Developer version of SQL Server 2000
Thank you,OK. how are you trying to connect?|||I have tried using using Enterprise Manager and the osql command line. Same message for both.
Thank you,
Friday, February 24, 2012
Developer limitation under SQL 2005 under Vista Ultimate 64 bit
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'ZAPHOD42\MSSMLBIZ'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database. (Microsoft SQL Server, Error: 1827)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=1827&LinkId=20476
BUTTONS:
OK
===================================================================================
The following is the Help obtained when clicking on the button on the error msg and the references in the error msg:
===================================================================================
Details
ID: Attach database Server
Source: Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText
We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.
--
Thank you for searching on this message; your search helps us identify those areas for which we need to provide more information.
Currently there are no Microsoft Knowledge Base articles available for this specific error or event message. For information about other support options you can use to find answers online, see http://support.microsoft.com/default.aspx.
==================
Details
ID: 1827
Source: MSSQLServer
We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.
Thank you for searching on this message; your search helps us identify those areas for which we need to provide more information.
==========End of reproduction of error messages and help text ====================================
The Developer Edition, of course, is supposed to enable us to program to all levels of the database, and I would hate to think it is really crippled in this way, but after uninstalling everything, reinstalling multiple times (devoting several days to the process), it sure beats me how I can overcome this problem short of going back to my old machine. Any definitive answers on this apparent limitation, or useful procedural advice on installation quirks, would be appreciated (and, yes, I've spent a lot of time going through the installation/setup forum -- if the answer is there I can't find it).
Seems as you want to attach a user database to a Express instance ? What is the output if you connect to the mentioned server and execute the following command: SELECT @.@.Version ?
Jens K. Suessmeyer
http://www.sqlserver2005.de
Microsofty SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Express Ediition on Windows NT 6.0 (Build 6000
I must say the X86 reference surprises me. I hope this means more to you than it does to me.
Bob
|||
Using a SQL Server Express edition you are limited to 4GB database size (all databases in sum of the instance)
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||I face the same problem... I have a Vista ultimate x64 and I tried to attach a small MDF to SQLexpress and I had an error. It's the same if I try to create a new db?
could you give me some help
Developer limitation under SQL 2005 under Vista Ultimate 64 bit
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'ZAPHOD42\MSSMLBIZ'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database. (Microsoft SQL Server, Error: 1827)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=1827&LinkId=20476
BUTTONS:
OK
===================================================================================
The following is the Help obtained when clicking on the button on the error msg and the references in the error msg:
===================================================================================
Details
ID: Attach database Server
Source: Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText
We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.
--
Thank you for searching on this message; your search helps us identify those areas for which we need to provide more information.
Currently there are no Microsoft Knowledge Base articles available for this specific error or event message. For information about other support options you can use to find answers online, see http://support.microsoft.com/default.aspx.
==================
Details
ID: 1827
Source: MSSQLServer
We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.
Thank you for searching on this message; your search helps us identify those areas for which we need to provide more information.
==========End of reproduction of error messages and help text ====================================
The Developer Edition, of course, is supposed to enable us to program to all levels of the database, and I would hate to think it is really crippled in this way, but after uninstalling everything, reinstalling multiple times (devoting several days to the process), it sure beats me how I can overcome this problem short of going back to my old machine. Any definitive answers on this apparent limitation, or useful procedural advice on installation quirks, would be appreciated (and, yes, I've spent a lot of time going through the installation/setup forum -- if the answer is there I can't find it).
Seems as you want to attach a user database to a Express instance ? What is the output if you connect to the mentioned server and execute the following command: SELECT @.@.Version ?
Jens K. Suessmeyer
http://www.sqlserver2005.de
Microsofty SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Express Ediition on Windows NT 6.0 (Build 6000
I must say the X86 reference surprises me. I hope this means more to you than it does to me.
Bob
|||
Using a SQL Server Express edition you are limited to 4GB database size (all databases in sum of the instance)
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
I face the same problem... I have a Vista ultimate x64 and I tried to attach a small MDF to SQLexpress and I had an error. It's the same if I try to create a new db?
could you give me some help