I am unable to create the personal.mdf when I run my homepage. I get the following error
Failed to generate a user instance of SQL Server due to a failure in
starting the process for the user instance. The connection will be
closed.
I am new at this stuff and any help will be welcomee. .
thanks
Seth
Hello all!This is my first on this newsgroup, because I am starting my adventage of MSSQL Server 2000 Enterprise.I have just installed this application on my local computer, but I don`thave any Northwind training databases, on which I could try it out. Can youtell me where I make a mistake? Can you also be so kind and tell me how canI add this northwind database to my SQL Server 2000.Thank you in advance for your helpMarcin
Hi All, I have a problem with the Club Starter kit that I downloaded from the SQL Server Express Site. I installed the VSI into VS2005 but when I try to save the project, VS puts up a dialog with "Unable to complete Operation." The project runs OK within VS but any changes I make are lost when the app closes because it won't save.
I know this does not appear to be a SQL Server Express problem but I'm wondering if anyone else has used the starter kit and experienced the same problem, and more importantly, how to fix it.
Hi, I am not sure is this a proper place for my question. All we know that creating a database can be done as the following. 1) Create a project named DBExample 2) Click Add->New Item. 3) Select SQL Databse and type a name.(Ex: Database1.mdf) A database is added to the project 4) Then add table and input values. 5) Set the primary key.... My question is I parsed a text file to form a 2d string array x. How can I convert x into the database?
Hello... I want to develop a web site having two features 1. Online Shopping2. Forums Im using SQL Server, ASP.NET and C#. Now the problem is that how do I configure the Databases. Whether I create new database for each or I marge the both things into one database. if i create saperate databases for each of the feature then users have to register for two times, first for forums and second for shopping. I dont want to do this...! I want users to register just for once. ____________Thanks in advNauman Ahmed
I downloaded the sample database AdventureWorks from microsoft . When I run the download it created the data and log files under data folder in MSQLalong with other data and log files of master databases etc. However I do not see this database in SQLserver management studio. Can some one help me how to fix this so that I will be able to see this database in management studio.
I am downloading this for SQL server reporting purpose
if i open the management studio express and trying to create a database by right clicking the server name and trying in the new query window,im getting error as
CREATE DATABASE permission denied in database 'master'.
I tried finding any info regarding this approach and I can't find any, so here I am (again!).
I'm trying to create a database using SMO on a freshly installed SQL Server Express (not going through the advanced install, not going through the surface area configuration, so a lot of things are "wrong").
I get an error
- use SMO to try and create a database; this is the pseudo-code combo used:
1. create new Smo.Database object;
2. create new primary file group and data file for that database (using Smo.FileGroup and Smo.DataFile); add them to the database.
3. invoke Create(). catch exception with the following details:
Exception details:
Microsoft.SqlServer.Management.Smo.FailedOperationException was caught HelpLink="http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476" Message="Create failed for Database 'NewDatabase'. " Source="Microsoft.SqlServer.Smo" Operation="Create" StackTrace: at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl() at Microsoft.SqlServer.Management.Smo.Database.Create() at Penta.Core.Library.Sql.Classes.Penta_SqlDatabase.Create() in C:Documents and Settings[...]
InnerException:
{"Directory lookup for the file "C:\Documents and Settings\[...]\NewDatabase.mdf" failed with the operating system error 5(Access is denied.). CREATE DATABASE failed. Some file names listed could not be created. Check related errors."}
Seems like user rights error.
Long story short, the only way the creation step works is if I change the Log on for the SQL Express service from the default Network Service to Local System (either through code or not).
Now, I know LocalSystem is not a wise idea, but it seems to be the only way.
I know it's probably something stupid, but what am I missing?
I am trying to get Classifieds Starter Kit work in SQL Server 2005. I did following:
1. Create DBs; The sql scripts came with the starter kit in the App_Data folder. 2. To create aspnetdb: aspnet_regsql.exe -E -S localhost -A mr 3. Open SQL Server Configuration Manager. Select "SQL Server 2005 Network Configuration | Protocols for MSSQLSERVER" then enable the protocols 'TCP/IP' and possibly 'Named Pipes' 4. My connections string <add name="classifiedsConnection" connectionString="Data Source=MyServerName;;User ID=user;Password=pass;Initial Catalog=ClassAds" providerName="System.Data.SqlClient" />
I still get the following error when I debug the application: 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Hi All, I have a web site where the user can select from a list of databases (they're actually all the same structure, but have data unique to each client). Each database is a SQL 2005 database held in the App_Data folder. This all works a treat. Each database is simply named after the client it is holding data for, and the connection string for each is stored in a database that is accessed However, what I need is a form where a database name can be entered, and I can then create a new database with the same structure as the others - including tables, indexes and stored-procedures. I know I can use the copy database wizard in the Management Studio, but that isn't an option to the users of this system (it's to be used on an intranet, and the page I'm trying to create will only be used by project managers - but these people won't have a clue when it comes to configuring databases themselves). I have scripted a database, but have no idea on how I can actually use this script from within Visual Studio and more importantly, don't know how to configue it to have the database name as a parameter. I've also seen some examples that suggest using SQL-DMO, but haven't been able to work out how to use it and according to Microsoft it shouldn't be used for new developments (http://msdn2.microsoft.com/en-us/library/ms132924.aspx). Anyway, I really hope someone is able to offer some assistance on this one as I've spent a whole day trawling forums and various web-sites trying to find a solution to this. Thanks & regards, Paul
I would like to know the sql command to generate all the scripts of a database so that I can replicate the same database for testing purpose. For instance, I need those scripts to help me re-create the database itself and indexes, triggers, and stored procedures of it if possible. I remember there was a command to display all these scripts in Sql but I forgot it. If someone knows it, please help. Thanks in advance. blumonde
I've never scripted a creation of a database and it's schema,I have started to put the script together and wondered if the following two scenarios were possible and if so could the following be possible and if so could you show me.
Scenario 1: Before the script runs it checks to see if a database of the same name exists. In this example the database name is "database1". If it does the script will stop and display a message along the lines of "You are trying to create a database, which name already exists. Please either drop or rename the current database and rerun this script."
Scenario 2:The more difficult one I think. Is that it checks to see if "database1" exists. If it does it displays a message along the lines of "The database you are trying to create already exists. Please confirm that you either want to Drop the Database" You then press a key on the keyboard to continue the script and the database is dropped. It will then tell you to rerun the script in order to create the "database1" database. Or you could even give them the option to either drop the database or rename it with "_todatdate" at the end of it, but if you can get the script to do different things with different keyboard strikes?
DATABASE1 CREATION SCRIPT Author: Ryan Keast
The following script creates a DATABASE1 database. */ /*DATABASE1 database creation */
the following msg appears whn i try to create a new database in Microsoft Sql Server Management Studio Express. I m on Vista Basic and using a administrator account...plz help.... i have my project whose backend is SQL 2005.
------------------------------------------------
TITLE: Microsoft SQL Server Management Studio Express ------------------------------
Create failed for Database 'timepass'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476
Hi all :)My apologies if I posted in the wrong groups, but I just jumpedin MS SQL waters, so any guidance will be appreciated.What I'm trying to do is the following process:[1] present operator with a web page (script)[2] once filled with db name and username, script will create..sql file[3] osql.exe will be called with, i presume, -i file.sql andcreate a databaseI have limited SQL knowledge, but I got the information fromEnterprise Manager when I ran 'All Tasks -Generate SQLScript' on how the .sql file should look like.I realized what are the commands that would create a fresh DB(I ran this for newly created DB), and figured my .php scriptshould create such a file.It's fairly basic, and I'm almost sure all of you know howoutputed .sql file looks like, but anyway here it is:Script is called with parameters 'six' as database name and'magarac' as user name:---------------------------------------------------------------IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name= N'six')DROP DATABASE [six]GOCREATE DATABASE [six] ON (NAME = N'six_Data', FILENAME = N'E:Databasepathsix_Data.MDF' , SIZE = 1, MAXSIZE = 20,FILEGROWTH = 10%) LOG ON (NAME = N'six_Log', FILENAME = N'E:Databasepathsix_Log.LDF' , SIZE = 1, MAXSIZE = 20, FILEGROWTH= 10%)COLLATE SQL_Latin1_General_CP1_CI_ASGOexec sp_dboption N'six', N'autoclose', N'false'GO....use [six]GOif not exists (select * from dbo.sysusers where name =N'guest' and hasdbaccess = 1)EXEC sp_grantdbaccess N'guest'GOif not exists (select * from dbo.sysusers where name =N'sinisam')EXEC sp_grantdbaccess N'magarac', N'magarac'GOexec sp_addrolemember N'db_owner', N'magarac'GO---------------------------------------------------------------I managed to get an exact replica of .sql file that EnterpriseManager created. It leads me to believe that this way ofautomated database creation is indeed possible.Really sorry for making you to go through all this text, butafter I get a green light on this from you guys, I'll have abit more problematic question.Is there any reason why this should not be used, or would fail?Thanks in advance :)P.S.Just as a heads-up, next part of my problem is automatedcreation of new MS SQL server login to use with new DB.
We have a production database, but due to the crippling load of somereporting tools, we are looking to have a separate reporting database.Due to it's nature, the reporting database doesn't need to be as upto date as the master, perhaps it could be refreshed every evening?What I wish to know is the best way to go about this. Replicating awhole database seems excessive as there are 7000+ tables and we don'tneed it so closely matching the production database. Log shippingalso seems out as we need the reporting database to be highlyavailable and if we keep applying transaction logs ever 15 minutes orso, we need to kick all the users out.Is there a way of scripting or automatically getting SQL Server 2k tocopy over the last full backup it did and apply this to anotherserver? Also if we used this method, what would happen to the usersstored in the database? Would I have to keep re-adding them after theupgrade?Is there a better way to tackle this problem? All help gratefullyreceived. We are running SQL Server 2000 Enterprise Edition on aWindows 2000 Server machine.Thanks.
I think its silly question but i expect some solution .
Is there any way to create sql sever database by using VB.NET code ? I have to create database,tables,sps and also transfer the data from one database to newly created database.
Please, if somebody have some solution then guide me in detail.
In the paste I have used SQL2000 to create db from the Query Analyser. In SQL2005 I can't see Query Analzyer but found under programs --> Microsoft SQL Server 2005 --> Configuration Tools --> Reporting Services Configuration --> Database Setup. It creates a database and I can connect to it from VS.NET. Here is my dilema, I was provided SQL scripts to create tables, stored procs etc. Where and how do I run these scripts to create these things in my newly create db.
But am getting the following error: 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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: 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source Error:
Line 5: Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs) Line 6: AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString Line 7: If (Roles.RoleExists("Administrators") = False) Then Line 8: Roles.CreateRole("Administrators") Line 9: End If
I am able to connect OK in both Server Management Studio (Server Name: SCastle, Windons Authentication) and clicking Connect to Database in Server Manager in Visual Studio (Server Name: (local)).
Have I got the connection string wrong or do I need to set up additional permissions in the database?
I notice when I create a new database within my SQL Server that the permissions for the new database automatically adds a user (Who is configured as sysadmin) with dbo permissions to this database.
Both within the login properties of the select user (User mapping) is listed as Default Schema, dbo and within the permissions of the database listed as user with connect permissions.
I have other users configured as sysadmin and they do not get this rights (They are not expliticly listed within user mapping with dbo or permissions as user within the database).
I've inherited this system and wonder if the user has somehow changed the new database procedure so it changes the default permissions of new databases.
Any way to check what he's done, I can see no differences between him and the other sysadmins but he's definatly specifically listed as a dbo on all new databases.
Although I don't mind him having access, he's a sysadmin after all, I'd like to make it uniform thoughout the system, i.e. using the inhertited permissions rather than specific permissions that seem to be created when the new database is created.
When I create a database from inside of Visual C# Express, why can't I view it with the manager from the SQL Server Express Edition? I mean, it does not appear at all. Is there any problem?
During the istall of the issue tracker starter kit, im prompted ti select the type of DB. If I select MSACCESS, all is good I have " Microsoft SQL Server 2005 Express Edition with Advanced Services" installedIf I select Microsoft SQL Server/MSDE 2000 I get the following 1) Sql Server ( I select local)2) connect using a) Windows authentication - WhenI do this I get the error message "Login Failure: could not loginto server (local)" b) SQL Server authtication - WhenI do this I get the error message "Login Failure: could not loginto server (local)"Please Please help me. I have to get this going or I'm mud !!! actually , less than mud
When I registered SQL Server Express I received an e-mail back showing all of the resources available to get started. There were 6 Starter Kits available, Teacher, Colection Manager, Amazon Enabled Movie Collection, and three others. When I click on the links to download the Starter Kits, the link comes back as invalid. Can you provide the correct links to use to get the Starter Applications, or can you e-mail me code? Thanks for you attention to this matter. Charlie Cappello CIGNA
I am new to sql server express editions. starter kits and Sample applications link provided in the sites are not working. Can anyone provide me the alternate link where I can dwnld them from
I have installed my modell database onto c:mssql7data...
How do I now change the properties of this so that when someone creates a database, the path it will get created to is set to d: I thought that I could just move model, but it seems that this isn't possible.
Is there a way to trigger the execution of a procedure when a database is created ? We're using this 3rd party system in which you only specify the database server. Whenever the users create a new "Storage Area", the system actually creates a new database.
I need to handle backups for that system so I want to create a procedure that will generate a backup device and backup jobs automatically whenever a database is created.
I will also need 2 procedures to handle database renaming and deletion. I searched around but can't find a way to trigger the execution of my procedures.
I need a trigger to set the creation date of a new record in the database... I tried the following, but it changed all records, not just the new one...
CREATE TRIGGER trgCreationDate ON [dbo].tabCustomerLookup FOR INSERT AS BEGIN UPDATE tabCustomerLookup SET CreationDate = getdate() END
Hi, In my system, for creating a databae the default path is in C: drive, but iwant to change into D: drive as a default path.Please tell me how to change??