Inquiry
Aug 9, 2006
I just have a basic inquiry about sql server mngt studio.
I have create about 50 tables under the Master database. i no longer want them there and would like to place all 50 of my tables into another database. The only way I can seem to go about doing it, is to go into the code and change "Use [Master]" to "Use [Quickwire]", where quickwire is my new database name. however, since there are so many tables this is a very tedious process. Is there an easier way...like a copy and paste concept?
Please let me know if there is..
View 2 Replies
Feb 15, 2008
Hello,
My question is more related to the process because I'm new to sql server 2005 (or 2008).
Here is the scenario:
I set up a company's application database at DATE1. As time goes by, I have created custom tables, views, stored procedures...
Now, for whatever reason, the server needs to be restore back to DATE1. Now my question is how can I keep and restored the custom tables, views and other entities that I have set up before?
I'm looking if there's an utility somewhere to let me compare the actual state of my database and the original one and let me know the differences and ask me if I want to save the differences.
I hope you understand my question.
Thank you
View 1 Replies
View Related
Jul 2, 2007
Hi to all,
I have asked this kind of question from another forum, which is the xtremevbtalk, but with little luck, only one has replied to my inquiry. I hope any of you can give me ideas. My question is this:
Do stored procedures execute exclusively on the calling program/thread (whatever you call that to the process that called the stored procedure)?
I mean if I have a stored procedure that adds a record in a certain table, and then it retrieves the autonumber of that newly inserted record (like the @@IDENTITY in SQL SERVER), and then use that retrieved ID for use in another table, will it work correctly? (Assuming that the stored proc is bug free.)
Is that good to implement in a multi-user environment? What happens if another user called that stored procedure too? User A called the stored procedure, and in a split second, User B called it too? Is it possible that User B will abe able to retrieve the ID of the newly inserted record that was made by User A?
Is stored procedures a good way to resolve concurrency issues? If not, maybe anyone could give me some ideas or clues how to approach solving concurrency and multi-user issues in database programming.
Thanks and god bless!
View 14 Replies
View Related
Oct 11, 2007
I have used this stored procedure for a project
ALTER PROCEDURE DeleteRecord
AS
Begin
Delete from TestEvents
where TestDate <= DATEADD(year, -2, GETDATE())
End
This stored procedure deletes test event data older than 2 years and when i right click and execute the stored the procedure from the server explorer, the stored procedure executes and deletes the relevant records from the database. Therefore i used this stored procedure in a click event as follows,
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand
Dim i As Strin
i = MsgBox("Are you sure to delete Old Test Events?", MsgBoxStyle.YesNo, )
If i = vbYes Then
Try
myConnection = New SqlConnection("Data Source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBfilename= '" & strPath & "'; ")
myConnection.Open()
MyCommand.Connection = myConnection 'Active Connection
MyCommand.CommandText = "DeleteRecord" ' Stored Procedure to Call
MyCommand.CommandType = CommandType.StoredProcedure 'Setup Command Type
MyCommand.ExecuteScalar()
myConnection.Close()
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End If
End Sub
I checked the connection string and the code and it does not contain any build errors but when the button is clicked the relevant records on the database are not deleted..
Could some one please provide me with a solution..
Thanking you..
Chris
View 4 Replies
View Related
Sep 13, 2007
Hi there
If you are working on enbvironment which the report development was done through local machine then you deployed the report to remote server, once you deployed the report to the reportserver does the .rdl file (source code) exist in deployment server?
So if I loose the solution on the local machine, can get this back from the reportserver or not?
I'm appreciated your feedback, that will be execellent.
Thanks
View 1 Replies
View Related