How To Getback Original Copy Of Northwind Database?
Apr 15, 2008
Hi,
Good morning to All.
While doing practice I did some modifications to some tables in Northwind database.
Now, how can I get my original tables back again?
Take Oracle for example:
We can modify table data. But when we run demobld.sql script then all tables will replaces with original entries.
Like this I want in SQL Server also. Is there any such facility available in SQL Server?
Thanks in advance,
Ashok kumar.
View 2 Replies
ADVERTISEMENT
Jan 14, 2008
Hi all,
From the http://msdn.microsoft.com/en-us/library/bb384469.aspx (Walkthrough: Creating Stored Procedures for the Northwind Customers Table, I copied the following sql code:
--UpdateSPforNWcustomersTable.sql--
USE NORTHWIND
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'SelectCustomers' AND user_name(uid) = 'dbo')
DROP PROCEDURE dbo.[SelectCustomers]
GO
CREATE PROCEDURE dbo.[SelectCustomers]
AS
SET NOCOUNT ON;
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM dbo.Customers
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'InsertCustomers' AND user_name(uid) = 'dbo')
DROP PROCEDURE dbo.InsertCustomers
GO
CREATE PROCEDURE dbo.InsertCustomers
(
@CustomerID nchar(5),
@CompanyName nvarchar(40),
@ContactName nvarchar(30),
@ContactTitle nvarchar(30),
@Address nvarchar(60),
@City nvarchar(15),
@Region nvarchar(15),
@PostalCode nvarchar(10),
@Country nvarchar(15),
@Phone nvarchar(24),
@Fax nvarchar(24)
)
AS
SET NOCOUNT OFF;
INSERT INTO [dbo].[Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax);
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers WHERE (CustomerID = @CustomerID)
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'UpdateCustomers' AND user_name(uid) = 'dbo')
DROP PROCEDURE dbo.UpdateCustomers
GO
CREATE PROCEDURE dbo.UpdateCustomers
(
@CustomerID nchar(5),
@CompanyName nvarchar(40),
@ContactName nvarchar(30),
@ContactTitle nvarchar(30),
@Address nvarchar(60),
@City nvarchar(15),
@Region nvarchar(15),
@PostalCode nvarchar(10),
@Country nvarchar(15),
@Phone nvarchar(24),
@Fax nvarchar(24),
@Original_CustomerID nchar(5)
)
AS
SET NOCOUNT OFF;
UPDATE [dbo].[Customers] SET [CustomerID] = @CustomerID, [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City, [Region] = @Region, [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone, [Fax] = @Fax WHERE (([CustomerID] = @Original_CustomerID));
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers WHERE (CustomerID = @CustomerID)
GO
====================================================================================
I executed the above code in my SQL Server Management Studio Express (SSMSE) and I got the following error messages:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'NORTHWIND'. No entry found with that name.
Make sure that the name is entered correctly.
===============================================================================================================
I know I recreated the NORTHWIND Database from a different Database before and I did not do anything for the entry in sysdatabases. How can I change the entry in sysdatabases for database 'NORTHWIND' now? Please help and advise.
Thanks in advance,
Scott Chang
View 5 Replies
View Related
Nov 15, 2006
Hello,i am in great trouble. I want to revert back to original state ofdatabase before i performed restore database on my sql server 2KDatabase. Accidently i didn't take backup of my Database and i didrestore, so is there any way to get the original state back of myDatabase?Any suggestion will be highly appriciated.Regards,S. Domadia.
View 2 Replies
View Related
Mar 26, 2008
Hi!
I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly.
How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)
Thanks,
Sandra
View 1 Replies
View Related
Feb 13, 2008
Hi all,
I try to learn "How to Access Stored Procedures with ADO.NET 2.0 - VB 2005 Express: (1) Handling the Input and Output Parameters and (2) Reporting their Values in VB Forms". I found a good article "Calling Stored Procedures from ADO.NET" by John Paul Cook in http://www.dbzine.com/sql/sql-artices/cook6. I downloaded the source code into my VB 2005 Express:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form_Cook
Inherits System.Windows.Form.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
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
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents labelPAF As System.Windows.Forms.Label
Friend WithEvents labelNbrPrices As System.Windows.Forms.Label
Friend WithEvents UpdatePrices As System.Windows.Forms.Button
Friend WithEvents textBoxPAF As System.Windows.Forms.TextBox
Friend WithEvents TenMostExpensive As System.Windows.Forms.Button
Friend WithEvents grdNorthwind As System.Windows.Forms.DataGrid
Friend WithEvents groupBox2 As System.Windows.Forms.GroupBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.labelPAF = New System.Windows.Forms.Label()
Me.labelNbrPrices = New System.Windows.Forms.Label()
Me.textBoxPAF = New System.Windows.Forms.TextBox()
Me.UpdatePrices = New System.Windows.Forms.Button()
Me.groupBox2 = New System.Windows.Forms.GroupBox()
Me.TenMostExpensive = New System.Windows.Forms.Button()
Me.grdNorthwind = New System.Windows.Forms.DataGrid()
Me.GroupBox1.SuspendLayout()
Me.groupBox2.SuspendLayout()
CType(Me.grdNorthwind, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.labelPAF, Me.labelNbrPrices, Me.textBoxPAF, Me.UpdatePrices})
Me.GroupBox1.Location = New System.Drawing.Point(8, 8)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(240, 112)
Me.GroupBox1.TabIndex = 9
Me.GroupBox1.TabStop = False
'
'labelPAF
'
Me.labelPAF.Location = New System.Drawing.Point(8, 16)
Me.labelPAF.Name = "labelPAF"
Me.labelPAF.Size = New System.Drawing.Size(112, 32)
Me.labelPAF.TabIndex = 2
Me.labelPAF.Text = "Enter Price Adjustment Factor"
'
'labelNbrPrices
'
Me.labelNbrPrices.Location = New System.Drawing.Point(8, 80)
Me.labelNbrPrices.Name = "labelNbrPrices"
Me.labelNbrPrices.Size = New System.Drawing.Size(216, 16)
Me.labelNbrPrices.TabIndex = 5
'
'textBoxPAF
'
Me.textBoxPAF.Location = New System.Drawing.Point(120, 16)
Me.textBoxPAF.Name = "textBoxPAF"
Me.textBoxPAF.TabIndex = 0
Me.textBoxPAF.Text = ""
'
'UpdatePrices
'
Me.UpdatePrices.Location = New System.Drawing.Point(8, 48)
Me.UpdatePrices.Name = "UpdatePrices"
Me.UpdatePrices.Size = New System.Drawing.Size(88, 23)
Me.UpdatePrices.TabIndex = 6
Me.UpdatePrices.Text = "Update Prices"
'
'groupBox2
'
Me.groupBox2.Controls.AddRange(New System.Windows.Forms.Control() {Me.TenMostExpensive, Me.grdNorthwind})
<Part 1----To be continued due to the length of this post>
View 1 Replies
View Related
Jan 14, 2008
Hi all,
I put "Northwind" Database in the Database Explorer of my VB 2005 Express and I have created the following stored procedure in the Database Exploror:
--User-defined stored procedure 'InsertCustomer'--
ALTER PROCEDURE dbo.InsertCustomer
(
@CustomerID nchar(5),
@CompanyName nvarchar(40),
@ContactName nvarchar(30),
@ContactTitle nvarchar(30),
@Address nvarchar(60),
@City nvarchar(15),
@Region nvarchar(15),
@PostalCode nvarchar(10),
@Country nvarchar(15),
@Phone nvarchar(24),
@Fax nvarchar(24)
)
AS
INSERT INTO Customers
(
CustomerID,
CompanyName,
ContactName,
ContactTitle,
Address,
City,
Region,
PostalCode,
Country,
Phone,
Fax
)
VALUES
(
@CustomerID,
@CompanyName,
@ContactName,
@ContactTitle,
@Address,
@City,
@Region,
@PostalCode,
@Country,
@Phone,
@Fax
)
=================================================
In my VB 2005 Express, I created a project "KimmelCallNWspWithAdoNet" that had the following code:
--Form_Kimmel.vb--
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form_Kimmel
Public Sub InsertCustomer()
Dim connectionString As String = "Integrated Security-SSPI;Persist Security Info=False;" + _
"Initial Catalog=northwind;Data Source=NAB-WK-EN12345"
Dim connection As SqlConnection = New SqlConnection(connectionString)
connection.Open()
Try
Dim command As SqlCommand = New SqlCommand("InsertCustomer", connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("@CustomerID", "PAULK")
command.Parameters.Add("@CompanyName", "Pauly's Bar")
command.Parameters.Add("@ContactName", "Paul Kimmel")
command.Parameters.Add("@ContactTitle", "The Fat Man")
command.Parameters.Add("@Address", "31025 La Jolla")
command.Parameters.Add("@City", "Inglewoog")
command.Parameters.Add("@Region", "CA")
command.Parameters.Add("@Counrty", "USA")
command.Parameters.Add("@PostalCode", "90425")
command.Parameters.Add("@Phone", "(415) 555-1234")
command.Parameters.Add("@Fax", "(415 555-1235")
Console.WriteLine("Row inserted: " + _
command.ExecuteNonQuery().ToString)
Catch ex As Exception
Console.WriteLine(ex.Message)
Throw
Finally
connection.Close()
End Try
End Sub
End Class
==============================================
I executed the Form_Kimmel.vb and I got no errors. But I did not get the new values insterted in the table "Custermers" of Northwind database. Please help and tell me what I did wrong and how to correct this problem.
Thanks in advance,
Scott Chang
View 10 Replies
View Related
Nov 2, 2006
I have to do an exercize where i am using Northwind sample database. I am normally accustomed to linking to a database on another server. Is there a way i can just include the Northwind database to my project. In general, I need to find out how to link to the Northwind db so I can start querying and processing data. thanks for your help
View 4 Replies
View Related
Apr 16, 2007
i need links from where i can download northwind database both access and sql format thanx
View 2 Replies
View Related
Dec 28, 2007
I want use the the Northwind database do some example! I had installed the Visual Web Deveplopment Express Edition and installed the SQL Server 2005 Express Edition .but I build one new Website and connect the Northwind database but i can't find the it from the Database Explorer.why?
View 1 Replies
View Related
Nov 7, 2006
sara writes "Dear Sir/Madam,
I use Sql Server 2005.I want to use Northwind Database & I have it but I could not Execute That It is the error:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'NorthwindCS'. No entry found with that name. Make sure that the name is entered correctly.
Would you please help me with that?
Regards,
Sara"
View 2 Replies
View Related
Dec 7, 2006
Hi All,
How can I find out the original size of the database?
Thanks.
View 5 Replies
View Related
Mar 25, 2007
Hi I have just started using the SQL Server 2005 Express Edition and wondering how to install the InstNwnd.sql from the sql file. I can't find any way to insert the database
Any help would be very appreciated
Thanks
View 4 Replies
View Related
Apr 6, 2004
OK
I've loaded MSDE and its running OK
I've run config.exe to install the sample .net databases,
......but I cannot find northwind or anyother db on the server!
I've never done any db work befor so may be I'm being a bit of a tit!!! sorry in advance if i am...
stuart
View 3 Replies
View Related
Jun 24, 2005
I'm installing Northwind Database onto Local Computer. The Computer's Name is (Localhost)The Installation Menu is asking to for the [Enter Name of the (Server)] "______________________" Am I correct in assuming to Enter Localhost - for the [Enter Name of the (Sever)]. "___Localhost_____" Can someone comfirm as to whether this is correct or not... Thank You.
View 2 Replies
View Related
Mar 11, 2004
I'm using XP Pro and I have the Developer's version of SQL Server installed. I downloaded SQLXML 3.0 and created a virtual directory named nwind.
I then entered the following on my IE browser:
http://<IIServer>/nwind?sql=SELECT FirstName, LastName FROM Employees FOR XML AUTO&root=root
the result is:
"The page cannot be displayed..."
I'd appreciate any help.
Thanks,
Pat
View 1 Replies
View Related
Jul 7, 2006
I have asked for the following questions and I need your advises.Utilizing the Northwind database suppied with SQL Server, create SQL tosolve each of the exercises listed.1.I want to contact all customers who have received over $1,000 indiscounts on orders this year. Give me the name and phone number of theperson to contact at the customers site. Also, list the orders wherethe total discount was greater than $100. Remember, discount is apercentage of the price.2.Give me a list of suppliers and products where we do not have thestock on hand to fill the orders to be shipped. List out the customerand order information for each of the products involved.3.Give me a list of all orders that were shipped after the requireddate for the week of Jan 7, 2001. I want to know the name of theemployees that were responsible for the orders.4.We are having a golf tournament and I need some prizes. Give me alist of the top 5 shippers by dollar amount in the last year.5.Some customers are taking us for a ride on shipping. Give me a listof customers and the orders involved where more than ½ of their ordersare being shipped to a region other than their home region.Please advise ...thanks a lot
View 2 Replies
View Related
Sep 15, 2006
i am getting an error ... given below and my web.config is also given below
can any one help me is my connection string right ...
i am using sql server 2005 ..
my system name is soft18 ..
Server Error in '/prjLogin' Application.
Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExcepti....................
........................
................
...................
//web.config
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="QuickStartSqlServer" connectionString="Server=localhostSQLExpress;Integrated Security=SSPI;Database=Northwind;" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="Login.aspx"
protection="All"
timeout="30"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Login.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false"/>
</authentication>
<membership defaultProvider="QuickStartMembershipSqlProvider"
userIsOnlineTimeWindow="15">
<providers>
<add
name="QuickStartMembershipSqlProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="LoginControls"
requiresUniqueEmail="true"
passwordFormat="Hashed"/>
</providers>
</membership>
<roleManager
enabled="true"
cacheRolesInCookie="true"
defaultProvider="QuickStartRoleManagerSqlProvider"
cookieName=".ASPXROLES"
cookiePath="/"
cookieTimeout="30"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
createPersistentCookie="false"
cookieProtection="All">
<providers>
<add name="QuickStartRoleManagerSqlProvider"
type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
applicationName="LoginControls"/>
</providers>
</roleManager>
<authorization>
<allow users="*"/>
</authorization>
<compilation debug="true"/>
</system.web>
</configuration>
View 1 Replies
View Related
Oct 20, 2006
I am trying to use SQL Express to support unit testing of functionality which requires database access.
I created an express database (.mdf) which contains a database snapshot which is the database environment that each test expects to see when it starts. Through the execution of the test the database will be modified arbitrarily and I need to reset the database to the original state before the next test executes.
Here's what I do today:
Before Test:
The original database is copied to a unique location in the temp directory
A unique database name is generated (GUID-based)
I connect to the new database file with:
Server=.SQLEXPRESS;AttachDbFilename="PathToTempFile";Database="GuidDBName";Initial Catalog="GuidDBName";Trusted_Connection=Yes;User Instance=true
During the test all database access is routed to the temporary database GuidDBName
After Test:
Close all active database connections and clear the connection pool
Connect to the master database and detach the database:
Server=.SQLEXPRESS;Database=master;Initial Catalog=master;Trusted_Connection=Yes;User Instance=true - sp_detach_db 'GuidDBName'
Delete the temporary file
When I do this, everything seems to work correctly but when I re-open the original database it has changed unexpectedly and includes the modifications that were made by the test as it ran.
Can anyone explain why this is happening and/or provide a solution?
View 1 Replies
View Related
Jan 30, 2004
I just downloaded and installed MSDE2000 sp3a for winform and asp.net
quickstart tutorial. But I found it has no sample database such as pubs
and northwind. It used to have these databases. At least in last September
when .Net web Matrix came out.
If this is the case, can someone tell me where to get the sql scripts
to create Northwind database in MSDE?
Becasue the winform tutorial uses this database.
Thanks in advance!
Lei Xu
View 1 Replies
View Related
Apr 30, 2004
Does anyone know where I can find a Northwind end to end database solutions (examples) written in ASP.NET (VB). I would like to reverse engineer this project to learn more about ASP.NET?
Thanks.
View 1 Replies
View Related
May 25, 2006
Hello.Does anyone have Northwind database file for SQLExpress ? I really need it for learning purpose now.Thanks in advanced.
View 1 Replies
View Related
Dec 14, 2006
I am trying to connect to SQL 7.0 northwind database via visual studio2005. But I can't open the connection. I get an error saying remoteaccess is not allowed. But the remote access is ok. I can used the samelogin and connect to the sql server via enterprise manage.SqlConnection conn = new SqlConnection("DataSource=(sqlserver:1433);Initial Catalog=Northwind;UserID=me;Password=mypassword");The above is the string I am trying to use.Is there a way to do this in Visual studio thanks
View 1 Replies
View Related
Mar 27, 2007
I made a copy of a database "sac_prod" and named the new copy "vgs_prod". Now, when I do a backup of the new database, it still shows the name of the original. Is there any way to change this so it will be the same as the new database name?Here is the BACKUP script:BACKUPdatabase vgs_prod TODISK='\sac-srvr1data$TechnicalSharedProductionSQLBackup LasVegasvgs_prod_CopyOnly.BAK' with COPY_ONLYHere is the messages I received from this BACKUP:Processed 1752 pages for database 'vgs_prod', file 'sac_prod' on file 1.Processed 6 pages for database 'vgs_prod', file 'sac_prod_log' on file 1.BACKUP DATABASE successfully processed 1758 pages in 0.412 seconds (34.955 MB/sec). I would like to change the file 'sac_prod' to be 'vgs_prod' in lines 1 and 2 just above. Thanks,
View 2 Replies
View Related
Oct 25, 2006
Hi.I'm very new to this so I apologise in advance for asking the blindibly obvious. I have installed SQL Express and SQL Server Management Studio Express and I have downloaded and attached the Northwind sample database. I can see and edit the data in the tables but when I try to open the Database Diagram node I get the following message:Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.I have no idea what a valid logon would be. Can somebody help? Thanks
View 3 Replies
View Related
Jan 14, 2008
i try create this example:http://www.codeproject.com/KB/webforms/ReportViewer.aspxI have Northwind database added in the SQL server management and i select Northwind databse in drop box and I push Execute!ALTER PROCEDURE ShowProductByCategory(@CategoryName nvarchar(15)
)ASSELECT Categories.CategoryName, Products.ProductName,
Products.UnitPrice, Products.UnitsInStockFROM Categories INNER JOIN
Products ON Categories.CategoryID = Products.CategoryIDWHERE
CategoryName=@CategoryNameRETURNbut error is:Msg 208, Level 16, State 6, Procedure
ShowProductByCategory, Line 11Invalid object name
'ShowProductByCategory'.on web not so clear what is issue pls. help
View 2 Replies
View Related
Feb 2, 2008
I am trying to execute the following query , in Management Studio. But it takes forever. Can someone tell me why is this happening? I am running the query in 'NorthWind' database.The windows account under which I am logged into WinXP (windows authentication is enabled for the SQL Server database) is the database owner for NorthWind database.
alter database NorthWind SET ENABLE_BROKER
View 3 Replies
View Related
Feb 23, 2008
I have been following the Visual Basic Guided Tour for VB 2008 Express and I'm having a problem with the following part.
ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vbcnexpress/html/48fcb538-d8c7-4299-a2bf-a5b6f80d879d.htm
Creating LINQ to SQL Classes: Using the O/R Designer
I am getting the error "Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.", when I get to the Test Connection button.
I have found the following help page,
ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/SqlExpressBol/html/85385aae-10fb-4f8b-9eeb-cce2ee7da019.htm
but I have no idea how to use this information as it assumes the user knows what they are doing!
The solution appears to involve running a scipt of some sort, but where would that be run?
I have looked at the SQL server Express information, but can't find how to run sp_configure.
Your help would be much appreciated.
View 4 Replies
View Related
Dec 1, 2007
Hi all,
I downloaded the Northwind database install script (SQL2000SampleDb.msi) and ran instnwnd.sql in my SQL Server Management Studio Express. I got the following error messages:
Msg 5105, Level 16, State 2, Line 1
A file activation error occurred. The physical file name 'northwnd.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'Northwind'. No entry found with that name. Make sure that the name is entered correctly.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Customers' because it is referenced by a FOREIGN KEY constraint.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Employees' because it is referenced by a FOREIGN KEY constraint.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Employees' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'LastName' already exists on table 'dbo.Employees'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Employees'.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Customers' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'City' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'CompanyName' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'Region' already exists on table 'dbo.Customers'.
(1 row(s) affected)
............................................etc.
Please help and advise me how to get the Northwind database installed in my SQL Server Management Studio Express.
Thanks in advance,
Scott Chang
View 6 Replies
View Related
Apr 27, 2006
Hi,
I tried to install the Northwind database into SQl Server Express via the instnwnd.sql script using the command line:
osql -E -i instnwnd.sql
after a time out though I get this message:
"[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [2].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections."
I already granted access to the administrator account on my machine.
Anyone knows what I need to do more?
Thanks in advance
greetings from Belgium,
Anthony
View 5 Replies
View Related
Apr 27, 2007
Hello all...
I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.
The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.
I want to be able to update their program without deleting all the settings they have.
Thanks,
Andreas Renberg
View 1 Replies
View Related
Jan 27, 2006
I am using Northwind database to Create a view showing every order that was shipped to Spain. Name the destination column 'DestinationSpain'. Include code that checks if the view already exists. If it does, it should be dropped and re-created.
Here is my script:
use Northwind
GO
/*STEP 2, #1*/
/* does it exist, if so drop it */
if exist (select * from dbo.sysobjects
where id = object_id(N'[dbo].[OrdersToSpain]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[OrdersToSpain]
GO
/* Create the View */
create view "OrdersToSpain" AS
SELECT
Orders.OrderID AS Order_ID,
Orders.CustomerID AS Customer_ID,
Orders.OrderDate AS Ordered_Date.
Orders.ShippedDate AS Shipped_Date,
Orders.ShipCountry AS DestinationSpain
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE Orders.ShipCounty LIKE '%SPAIN%'
GO
Here are the errors I am getting:
Server: Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'select'.
Server: Msg 170, Level 15, State 1, Line 6
Line 6: Incorrect syntax near ')'.
Server: Msg 170, Level 15, State 1, Procedure OrdersToSpain, Line 7
Line 7: Incorrect syntax near '.'.
View 6 Replies
View Related
Sep 3, 2015
I cannot open now my database after changing it name from the folder where it is save and also changed back to its original name.Message recovery pending now is appearing as shown below.Any chance that I could recover my database back?
View 17 Replies
View Related
Jan 19, 2006
I have Visual Studio 2005 Beta 2.00 install which have installed the SQLEXPRESS server.
I have the Script for the Northwind database which I need to run some demos but I can figure out how to execute this script.
Can someone tell me what todo or how to attatched the database to this server. I also have a copy of the database already created. But When I tried login in into the database I get an error login fail.
Which is the default user amd password for the northwind database?
Tia
Charles
View 1 Replies
View Related