Setting Up A Database

Feb 20, 2006

Hi people,

I'm in the process of trying to set up my first SQL Server database and things aren't going as per the book! (surprise, surprise).

The 'Identity Specification' option during Table creation, is 'greyed out' and won't let me set (Is Identity) to 'Yes' or anything else for that matter.

I guess that there's a simple answer to this one, but as a newbie to SQL Server ( and VB 2005) I'm curently at a loss.

Can anyone point me in the right direction?

Niknek

View 1 Replies


ADVERTISEMENT

Setting SQL Database So That Cold Fusion Will Go To New Database Instead Of Master

Apr 17, 2001

whenenver i run cold fusion, it automatically gets my tables out of the master database instead of the new one i have created. i've added a user that has a default to the new database instead of the master, but i need to know how to use that new user correctly, and what i will need to do once i start adding more databases so that cold fusion will go to the appropriate database and not to the master.

View 3 Replies View Related

Setting Up SQL Database

Apr 7, 2007

I have been using MySQL as the back end of my .Net 2.0 applications for a while using a custom membership provider without any problems.Having now switched to a new webhost which supports both MySQL and MS SQL Server 2005 and also creating a new site thought I should set up the new site to use MS SQL..... I am having trouble however setting up the SQL server to act as the membership provider. Following the advice on here I tried using aspnet_regsql.exe...  Firstly, when trying to get the list of databasses on the remote server I get the following error: Failed to query a list of database names from the SQL Server. Invalid object name 'Sysdatabases' If I then just type in the name of my database and go through to the end I get the following error:Exception:An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 8152 and the SqlException message is: String or binary data would be truncated.   I can connect to my MS SQL server remotely without any problem using the likes of MS SQL Server Management Studio Express. Is there any other way I can setup the databases needed for user and roles access control or is the usage of MS SQL much more complicated than what MySQL was?  

View 4 Replies View Related

Database Setting

Dec 9, 2004

. The BPA recommend that the model database setting for the items below be set to on. I can accomplish this task through the query analyzer and run the set command. (Set ANSI_NULLS on). The response is positive but when I re-run the report the setting are back off.

Why???

•QUOTED_IDENTIFIER
•ANSI_NULLS
•ANSI_WARNINGS
•ANSI_PADDING
•ANSI_NULL_DFLT_ON
•CONCAT_NULL_YIELDS_NULL

View 5 Replies View Related

Setting Database Data

Apr 4, 2008

I'm having trouble changing data in my database. It is actually a VB cuestion, but you see, i just finished lesson 9 of the begginers Visual Basic 2005 video series and in my last run i can't save the data i've changed into the database. no errors are shown, it just does't change the values.
i know for a fact that the code is well written and there is no problem with the configuration of buttons and such, because i folowed the steps 50 times so I believe it must be a SQL configuration problem.
does anybony have any insight on what the problem might be.
THX malcolm
 

View 2 Replies View Related

Readonly Setting For Database

Jan 29, 2004

we have a database that only serves Select requests (no OLTP) for our very high traffic websites.
what are the benefits of turning on read-only setting for the database if there are no transactions occuring in the database?
does sql server put locks on tables for SELECT statements?

is it the same as using HINT (NOLOCK) ?

thanks
stephane

View 1 Replies View Related

Setting Up Database On A New Server

Feb 23, 1999

Hi,

There has been a lot of discussion about moving single databases or devices in same server. Can someone suggest the most simplest method to set up a identical server with all the logins, permissions and password etc?

Building a new server with sp_help_revdatabase and dumps/loads is relatively easy but moving the master is confusing to me. I should run the new server and databases for a little testing period (with diffrent server name, of course) and then go live by dropping the old and by adding the new. I remember someone said that this would be as easy as copying master.dat to new machine (when servers are identical), any experience or other suggestions?

TIA,
Al

View 2 Replies View Related

Setting Database Priority

May 9, 2006

Hi all.

Does anyone know how to set a database priority? I have a SQL Server that contains multipule databases. One of the databases is very high priority. I need to make sure that no matter what is running on the server that this database's processes take priority and nothing slows it down.

Thanks.

View 2 Replies View Related

Default Database Setting

Mar 18, 2015

Is there any practical downside to setting ANSI_NULLS and QUOTED_IDENTIFIER to ON at the database level? Almost all devs will simply leave these default settings at the top of a stored proc script anyway.

View 2 Replies View Related

Check For A Database Setting

Feb 14, 2007

I want to query my databases to find out if Auto Shrink is set. I know the status column in sysdatabases holds this value as a bit setting but I don't know how can I check this value using a query.

Canada DBA

View 1 Replies View Related

Connecting Without Setting Up A Database Possible?

Nov 28, 2007

Hello everyone, I am fairly new to SQL Server Express and I have a question I was hoping someone could help with. I know this will sound very wacky but please entertain the possibility of such scenario taking place...

Is it possible to connect to an instance of an SQL Server Express 2005, using asp, without having a database created and without configuring anything such as permits or users first ?

The SQL Server Express was installed on a PC that runs a web server as well but nothing else was done, I only have the instance name and I know the SQL Server is configured for local access only.

I was hoping to create a database and begin using it with an asp file that runs SQL commands I can input on a text window, but I can't find connection strings that work without specifying a database name, and also I don't know which user and password to use because it is set to windows authentication.

I thought the code would go something like this:

Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Driver={SQL Server};Server=SQLinstance;Address=localhost,port;Database=;Uid=;Pwd="

To top things out the web server is configured to send out a generic error message, so I can't see what the error I'm getting actually is...

Any thoughts ?

Thanks.

View 2 Replies View Related

Setting Password For Each Database

Jul 23, 2005

Hi,When I create a new database from Enterprise Manager (right click ondatabases > New Database) I noticed that I am not prompted to create apassword or user name. Can I take it then that all databases under thesame local group will have the same password and user name?I have tied to access the newly created database using the samepassword and username but haven't had any luck.Thanks

View 3 Replies View Related

Setting Up Database Snapshot

Oct 26, 2007

I have created a snapshot

CREATE DATABASE AdventureWorks_Snapshot1200 ON
(NAME = N'AdventureWorks_Data', FILENAME=
N'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAW_1200.ss')
AS SNAPSHOT Of AdventureWorks


I changed the records
AddressLine1
from 1970 Napa Ct. to 1970 Napa Ct. Apt 1

When i run
select * from Person.Address
AventureWorks_Snapshot1200 where addressid = '1'

select * from Person.Address
AventureWorks where addressid = '1'
Both appear as 1

When i change Apt to 2 and run it both appear 2
Changed again to 3 both appeared as 3 too.


I was under the impression that the snapshot would remain as 1 when the new update 2 has been performed.

Any light be appreciated.

View 4 Replies View Related

Setting Up A Database Copy.

Mar 31, 2008



Hi all :-)

I am new to Sql server and hope that someone in here might be able to help me out with a little advice on how to go about how to achive the following.

My boss wants me to set up a copy of one of our production databases, the copy is supposed to be used for running questions against thru businessobjects. There will be aprox 10 simultanious users, the original and the copy must never be further apart in time then 15 min. The database is today about 25 gigs and to make it even more complicated the copy must be available at all time during business hours (8-17). The solution is also supposed not to influence the production databases perfommance to much (really low impact to the performance is a key issue).

The options I have thought of is:
1. Use mirroring and then take a snapshot of the mirror for the users to connect to.
2. Replicate only the data that is needed.
3. Log shipping in a combination with the online restore option in sql 2005 server.
4. Log shipping and then take a snapshot of the copy for the users to connect to.

I have also thought about if the need for current data is that high it might even be better to let them run their questions directly against the production db instead since there will not be so many simultanious users.

Any of you guys that have any ideas, all tips will be very appreciated!

Thanks in advance :-)
/Wandy

View 8 Replies View Related

Setting Up/accesing Database In VB Codebehind

Jul 9, 2006

Hey All,
I'm very new to ASP.NET and have recently begun using the databinding functionality.  So far, all I've had to do is drag and drop the various controls and then use the data source wizard to set up an appropriate query.  However, now I've got a bit of a different need.  In the VB codebehind, i need to be able to ask whether something is true in the database, and then if it is, carry out functions.  So, for example, what I need to do is:
if (SQLStatement "Select charttype FROM charts WHERE datasource = " & dropdownlist1.selecteditem.tostring()) Then
'do whatever
end if
Trouble is, I don't know how I would go about binding the data so that I could access it in this way.  Any guidance would be very much appreciated. 
Thanks,J Rankin  

View 1 Replies View Related

Other Way Of Setting Current Database In SQL Script

Nov 7, 2001

Hi,
I'm trying to create an SQL script that creates a new login account for each of our databases. The one remaining problem with the sql is it could not set the current database using a variable(e.g. USE @dbasename). I tried looking for another way of setting the current database but could not find one.

Is there any other way of setting the current database other than the USE command?

Any help/suggestion will be appreciated.

Thanks in advance,
Julius

View 1 Replies View Related

Setting The Defualt Database In SQL 2005

Mar 28, 2006

Its not a big deal but enoying enought that i always have to

USE MyDatabase

-- Instead of having it set as the defualt and not adventureworks

View 3 Replies View Related

Changing Database Collation Setting?

Mar 6, 2012

I currently have a server with the collation set to SQL_Latin1_General_CP1_CI_AS.

However, some of the databases within the server are set to Latin1_General_BIN, probably because they were restored from another server some time ago. Also, even within the databases that have Latin1_General_BIN, some of the columns are set to SQL_Latin1_General_CP1_CI_AS, very confusing to say the least.

What i would like to do is change the database collation settings for these databases to match the server setting. I would also like to change all of the tables within these databases to have the columns also set to the server collation settings.

I'm looking for the steps that i would need to take to make sure i don't mess anything up as these databases have there own sets of views and sp's that run each day.

View 3 Replies View Related

Setting User Name && PWD On SQL Express Database

Dec 6, 2005

How do you set a user name and password on a SQL Express database created using the data explorer in VB2005EXP?

View 1 Replies View Related

Setting A Maintenance Plan For A SQL Database In The SERVER

Jun 10, 2007

I learned how to make SQL database BACKUPs through Maintenance Plans in SQL server 2005 in my own computer.
So my question is: When I finally would be deploying my ( asp.net 2.0) web site in a distant real server, how could I set a Maintenance Plan there ?

View 2 Replies View Related

Easy Problem, But Need Help With Setting Up Database Keys.

Jan 29, 2008

I need help setting up my primary keys for a database table. Suppose I have two tables, as listed below. The first one isa table of students and the course they are enrolled in. The second table is a table of test scores. Never mind that this could be designed better. Please just using my design as an example, I need help.
 
 
First table - Student Table
Student Id    Student   Course   Building1                   Joe       Math101     Primus Hall2                   Jake      Engl103     Indigo Hall3                   Mary      Art107       Money Hall
So my question is the following. On my second table below, can I just haveone Key as the Primary key? Just like in the first table. I will have a primary key named "TestId"
If so, how do I set up my table so that the values in the "TestId"table will be automatically generated upon inserting into the Testscore table.
 
Second table - Tests Score Table:
TestId    StudentId TestScore  Date  1           1         99         9/1/07  2           1         100        9/15/07  3           1         88         9/16/07   4           2         99         9/1/07  5           2         100        9/15/07  6           2         88         9/16/07   7           3         79         9/1/07  8           3         100        9/15/07  9           3         100        9/16/07

View 1 Replies View Related

Setting The Port For The Database Connection In Vs 2005 And Also In Web.xml

Feb 15, 2006

I've mapped a sqlserver machine within vs2005, but when I attempt to set the database connection, I dont see place to stick the port number (even in the advanced area)... it continues to fail when I test the connection.. I can telnet into the machine on the sql server port, so I know its open to me...
Also - when I publish this to an IIS server, what is the syntax for placing the connection and port number in web.config?  I've tried various settings, cant get it to work. <appSettings><add key="con" value="Server=12.123.123.123;PORT=1234;UID=*****;PWD=*****;database=mydb" /></appSettings>
 
Thanks in advance for the help,
Todd

View 3 Replies View Related

Database Setting Itself To Single User Mode

Mar 19, 2001

Our company has several SQL Server 7 databases. One of them has now on two occassions, set itself to 'Single User' mode. I am completely baffled as to what can be causing it.

There's no jobs set up to do it.
There's no stored procedures programmed to do it.
The SQL Server Log shows that a DBCC CHECKDB ran at 18:00:37.73 and that users attempted to and couldn't log in from 18:01:01.95 onwards.
There is a maintenance plan set to run every two hours that does a backup, integrity checks, so it fired the CHECKDB.

Any ideas please?

Thanks.

View 2 Replies View Related

Autogrowth And Initial Size Setting For Database

Jul 8, 2015

give me the best autogrowth & initial size setting for database

View 7 Replies View Related

Setting Up Isolated Multi-Tenant Database

Sep 16, 2015

I have a several questions with regards to setting up a server to cater for multi tenant database.

I have a requirement to host 100 isolated databases for the purpose of multi user environment where each user has it's own database. This is due to security restrictions that why it was requested to be such.

1. What I'm recommending is to setup servers with 256GB of RAM to host multiple databases. Are there servers which can accomodate 256GB? Is this optimal with regards to performance? Or should I break it down to smaller servers with less RAM?

2. Is there a way to determine the CPU requirements for the DB server, taking for example we have 20 databases per DB instance? Are there any best practices / calculators available?

3. Additionally, data from the 100 DB's needs to be consolidated into 1 central repository for Analytics purposes. What I'm looking at is to utilize SQL Server transaction replication. Is there any drawback with this approach? Are there any other approach we could use to easily replicate data across 100 database back to 1 central repository?

View 0 Replies View Related

Setting Up Multimedia Database (Including Photos)

May 24, 2015

I am new to sql server and i would like to set up a multimedia database (includes photos) using sql server (regardless of the version). How can i achieve that?

View 3 Replies View Related

Guides On Setting Up Schema For A Database Wanted

Jan 16, 2008

In my SQL Server 2005, we stored multiple application tables in a single database. All of them is using the dbo schema in the past.

Now, we would like to change this practice and adopt a better one. However, we got some problems in the configuration.

If I want to create such a database, should I first create multiple logins and multiple users for all the application. The mulitple logins are used in the connectionstring of my web. While each login can only have 1 user in a database, I need to create a user for each login as well. (Am I correct in doing so? It seems a bit messy.)

The other problem is what should the database role of all that users? If I don't grant them the db_owner. They can't create the required tables. If I grant it, it voliate the intension of separating different application...

Please help. I am a bit lost on this now. Thanks!

View 1 Replies View Related

SQL Server 2008 :: Database Mirroring Timeout Setting?

Oct 20, 2011

I have setup database mirroring with witness server. To prevent unnecessary failover because of network slow or other issue, I changed the timeout setting as

ALTER DATABASE <Database Name>
SET PARTNER TIMEOUT 120

Which I understand if connection is broken between principal and mirror, principal database will wait for 120 second and after that only automatic failover will happen.

If this is true, it does not happen in my case. Failover happens before120 second.

View 5 Replies View Related

Native Client Ignores ANSI_NULLS Setting In Database

Oct 26, 2006

Hello,

I'm using the SQL Native Client to connect my VB6 application to my SQL Server 2005 database. My SQL Server 2005 database has ANSI_NULLS turned off. I have a query embedded in my VB6 application that uses the syntax "fieldName = NULL" in the WHERE clause. When I execute the query via the SQL Native Client, the query returns zero rows. When I execute the same query via the old OLEDB driver, the query returns many rows. If I change my query to "fieldName IS NULL" syntax, the problem goes away. However, I am more interested in figuring out why ANSI_NULLS are turned on when using the SQL Native Client even though my database has them turned off. Is there a connection string property that I can use with the SQL Native Client to ensure that the query is executed with ANSI_NULLS off?



Thanks

View 15 Replies View Related

Setting Sql Server Authentication For Database User - Wont Let Me

May 22, 2006

I have created a database now I am setting login details for that user. I am using slq server authentication and entering a password of recommended length.

I enter my details in my webconfig file and I get -couldnot connect to database specified in connection string for sql data provider.

when I check the login properties the password has changed it appears to be the password for NT Authoritysystem, ie same length, what it is Idont know.

What am I missing?

View 4 Replies View Related

Setting Up SQL 2005 Linked Server Connecting To A DB2 Database

Oct 21, 2006

Hi,

I have setup a linked server to a DB2 database using "Microsoft OLE DB  Provider for ODBC Drivers",

the connections works fine i am able to run select queries.

but the number of rows returned from the two following statements are different.

select * from linkedserver...tablename

select count(*) from linkedserver...tablename

e.g. The First statement returns  116 rows, whereas the second query returns count as 144....

I am a bit confused ?????

could anybody think of any possible reasons..

Cheers

ARAW012 

View 4 Replies View Related

SQL 2012 :: Does Setting A Database Offline Free Up Resources On The Server

Jun 25, 2015

I have about 50 databases that are only accessed once a month and on a predictable schedule. Would it free up resources on the server if they were kept offline and brought online only when needed ?

View 8 Replies View Related

SQL 2012 :: Query Based On Column Name / Setting Up Database Table

Oct 30, 2015

I have a set of data spread across a number of tables regarding stock market data. An example of this follows:

Market Capitalization...

Date CompA CompB
01/01/11 100 5
02/01/11 102 4

Share Price....

Date CompA CompB
01/01/11 100 100
02/01/11 101 99

Event Data...

Date Company
01/01/11 CompA
02/01/11 CompB

Pretty simply, I need a way to retrieve the market capitalisation and share price data based on the event data. So for instance I say 'oh, there is an event on the 01/01/11 involving company A, the market capitalisation on this day was 100, then for the next event it was 4 for company B.

I can also transpose the data so that the company name is in the rows and the dates in the columns for the market cap and share price tables, but this leads to the issue that when I try and get the data, I don't know how to query the correct company for that date.

For instance:
SELECT Event.Date, Event.Company
FROM Event

how do I now say.....

SELECT MarketCapitalisation.Column
WHERE Column = Event.Company
AND MarketCapitalisation.Date = Event.Date.

I have played around with a few basic joins, but I am having issue with the principle of that second to last line of SQL (so only getting the correct column).

I still have a copy of the data in excel so can flip things around as needed, but that would only mean that I would have the issue of WHERE Column = Event.Date instead of Event.Company.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved