Base Guidelines
May 31, 2007hi all
i want to know the basic guidelines for developing and implementing and developing sql server database
Thanks in Advance
Malathi Rao
hi all
i want to know the basic guidelines for developing and implementing and developing sql server database
Thanks in Advance
Malathi Rao
himy self avicurrently i am developing one application in vb 6 and back end assqlserver 7 which is used on lan.i have some problem. like in my database i have one table salesvoucherwhich has 'voucherno' field. when 2-3 user will work on salesform at atime [since the softwrae will run on lan] then the same voucherno willsave for all users data which is wrong i need to save different vouchernofor each no. is there any way in sqlserver to apply some condition ondatabase or to set some its property[tables] so that at a time only oneusers data will save depend on firstcome first serve base or is there anyway to make changes in programme.plz help me regarding this i need it very badly.since its my first lan based software plz give me some books nameregarding this software for vb6 and sqlserver7
View 2 Replies View RelatedHi folks, ya all are just fine i hope.
I've a question regarding indexes.
I've a table that is very often updated. My boss asked me to keep a log of each record when the table is updated. I've created an AFTER UPDATE trigger on the table and throw the old record into a log table on each update. The table would get large earlier. I want the updates on the original table fast, so i don't wanna add any kind of indexes on the log table. The log table will be scarcely queried only if the user has made a mistake and we want the old record back.
Now, i've column named event(DATETIME) log table that records CURRENT_TIMESTAMP. Should i create a clustered index on this column so the records get in sequence (the values in the column will be unique due to time and seconds being stored). I could be able to access records fastly in the log table on the basis of EVENT column. But how much it would cost the updates on the original table??
My major concern is to keep the updates on original table fast while logging the old records.
Usually it's said not to created indexes on date fields. Do i need to create non-clustered index or i am following the correct path.
Any tips and guidlines; highly appreciated.
Howdy!
Hi All,
We have an application requirement for a database supporting field service engineers, which calls for a central SQL Server databse, and laptops with the same database replicated onto SQL Express. I'm resposible for designing the database for this, physical and logical. I've designed and built many a database, but never had to use replication before.
I've read through BOL, and understand how the merge replication process works, and I have no problem designing the database assuming it were to run on a single server.
What I am trying to find are whitepapers, or equivalent, on "best design and implementation practice", and especialy common mistakes to avoid.
I know that the windows programmers responsible for the UI will not completely abstract the database from the code (no matter how desirable that is or how often I tell them!), and I really don't want to find I have to change the physical tables or replication logic after they've coded most of the UI .
Many thanks in advance
Richard R
What is exactly the recommended way of using a SqlCeConnection object in your application?
In all the examples I see (IBuySpyDelivery for example) it opens the connection object in the constructor and leaves it open most of the time until the class gets disposed.
Is that the way to do it? Or should you open and close the connection for each database action (insert/select/delete) you're doing on the local SQL Mobile database?
I'm a bit confused, but maybe I'm messing up the way of working on remote database servers with how it should be done on a local SQL Mobile db.
Hello all,
We have some doubts regarding NSTL guidelines for motorola Q. Our application is managed application. Which ocasionally connects to server. It is very helpful if we can get answers urgently.
Hopper Test How can we make it run on Smartphone 5.0 (Motorola Q)? Is this tool only applicable for pocket pc 2003?
Application Verifier Test Tool Is this tool only applicable for unmanaged code? If we are using .NET as the development environment, do we still have to use this tool?
Call Interupts Is their a special way of handling Call Interrupts in the application or the default behaviour provided by the device (Moto Q) is OK?
Send Key (Green key) on the device What is the expected behaviour of this key when the application is running? Do we have to handle it separately in the application
Is their a maximum space limit allowed for creation of the database files for an application?
Is their any specific utility like MaxfileCNT which NSTL uses for checking the behaviour of the application when there is no space available on the device?
thanks & regards,
Rashmi
We are about to change the sa password, currently all packages and jobs rely on this account. I imagine there is probably a better architecture that we could employ to ease this process. Any suggestions recommendations?
Also any caveats I should be aware of regarding places to look that might currently rely on the sa account so that we do not need to worry about existing processes from breaking?
I think we are going to create an NT account for DTS Packages and possibly use the same account for any DTSRun jobs, does this make sense? Or is there anything to gain by having these as separate accounts? Also should this be the same account used to run the MSSQLServer process?
I tried doing a search for this information here, thinking it was already covered, but could not find anything that informative, any resources that you could point me to would be appreciated, I will look on BOL as well as MSFT to see what I can dig up.
I am looking for guidelines for log file sizing, specifically where database reorgs are required
View 1 Replies View Related
Good Morning, I've been searching through all the tutorials and questions, have tried many things. I am still getting "[SqlException (0x80131904): 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)]"
as an error. This is what I've got:
Im using SQL Server Express 2005, installed with the default settings. Had not touched this program for anything until I started to follow directions to fix Error 26. Visual Web Developer Express ASP.NET is what Ive used to build the webpage. I was using the ASP.NET web configuration to add users to the database, which is set to use the provider ASPSqlServerProvider.
SQL Server 2005 Surface Area Configuration
Database Engine Remote Connections set to Local and Remote Connections Using TCP/IP Only?
SQL Server Browser is Enabled and Running
- is set to Active, under Built In Account Network Service
I have created Windows firewall exceptions for:
sqlservr.exe
sqlbrowser.exe
udp port 1434
SQL Server Configuration Manager
both SQL Server and SQL Server Browser are running.
Under SQL Server 2005 Network Configuration
Shared Memory and TCP/IP are enabled only.
SQL Native Client Configuration
Shared Memory 1
TCP/IP 2
Named Pipes 3
all enabled
I read through the post at http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx but as I'm new to SqlServer I do not know how to check on the first three items.
I'm getting extremely frustrated, and would just like the login portion of this website to start working before my boot ends up through the computer. Please help, lol, thank you.
Hi,
We have a number of databases running on our SQL2000 Servers. The databases use Stored Procedures which we call from our VB.NET apps, developed in-house. We now wish to upgrade our servers to SQL2005.
In the past, when upgrading from VS2002 to 2003 and then 2005, we have developed and executed Test Plans to ensure that the code upgrades properly. Microsoft even supplies FXCop and other tools to help. I now wish to develop and execute a similar Test Plan to ensure that our databases will work as required.
Does Microsoft supply any similar tools or guidelines for testing that databases written for SQL2000 will work as required on SQL2005? I see the Upgrade Wizard to examine the Server but is there a similar tool for testing databases? Are there any guidelines on the tests to include in such a Test Plan?
Thanks
Hi guys, can I know the steps on creating a database snapshot on a mirror database? Thx for the assistance. :)
Best Regards,
Hans
I am using MS visual web developer and i get a lot of things but one
thing i do not get is why is it when i set up the web.config to a data
base i made on my own and run the website and create an account it
creates a new data base and creates that new account in that new
database, i've never opened the web admin tools. <connectionString>
<add name="LoginConnection" connectionString="Data
Source=.SQLEXPRESS;AttachDbFilename="C:Visual Studio
2005WebSitesWebSite1App_DataYourEstate.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings>
Hi,On first sqlserver install, what's the default base to test connectwith JDBC please ?Is it "system" base with sa/master password ?Thanks,--Jean-Luc M.
View 2 Replies View RelatedI make my login account data base using the Web Site Administration Tool in the solution explorer i then debug it on my computer and it works fine i can login then i upload my site and sql data base to server and it no longer works i just get this message what do i do can i change the Web Site Administration Tool so that it uses a access data base by default for login instead of sql.Server Error in '/KRAZYJON' Application.
Failed
to generate a user instance of SQL Server due to afailure in starting
the process for the user instance. The connection will be closed.
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.
SQLExpress database file auto-creation error:The
connection string specifies a local Sql Server Express instance using a
database location within the applications App_Data directory. The
provider attempted to automatically create the application services
database because the provider determined that the database does not
exist. The following configuration requirements are necessary to
successfully check for existence of the application services database
and automatically create the application services database:
If
the applications App_Data directory does not already exist, the web
server account must have read and write access to the applications
directory. This is necessary because the web server account will
automatically create the App_Data directory if it does not already
exist.
If the applications App_Data directory already exists, the web
server account only requires read and write access to the applications
App_Data directory. This is necessary because the web server account
will attempt to verify that the Sql Server Express database already
exists within the applications App_Data directory. Revoking read access
on the App_Data directory from the web server account will prevent the
provider from correctly determining if the Sql Server Express database
already exists. This will cause an error when the provider attempts to
create a duplicate of an already existing database. Write access is
required because the web server accounts credentials are used when
creating the new database.
Sql Server Express must be installed on the machine.
The process identity for the web server account must have a local
user profile. See the readme document for details on how to create a
local user profile for both machine and domain accounts.
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): 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.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735043 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +68[HttpException (0x80004005): Unable to connect to SQL Server database.] System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +124 System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +86 System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +25 System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +397
hi Sir,
I want to know how to connect the Databse to ASP.Net code with c# with MSSQL servers.
Hello friends,
i would like to create an e-commerce website,for selling music,video,games and books, i also want to extend its functionality to electronic products also.
the problem is ,music,books,videos and electronic goods will have different properties like author,music director,company,ISBN number,..etc,i am very confused about data base design,want to add sub categories also like light music,classical,history books,technical books etc...can anyone give suggestions?
Hi
I have a problem with my data base.
when i run my project (ASP.NET) in Vs 2005 my data base work.
but i run in localhost isnΒ΄t work.
my data base as a .mdf(sql server)
Can help-me ???
Anybody know how to restore a backup of a database (done via a maintenance plan) from one server, to overwrite a database sited on another server. I can't manage to point it to a directory on the Server where the backup resides (I've shared the directory at NT level).
View 3 Replies View Relatedhello
any one could tell me about database administrator.
i want to connect oracle management server for import database of sql server 2000, i new the its
user : sysman
and also its password.
it is connected first time and i change its password
now i am trying to connect it but a msg is prompt
"VTK-1000 : Unable to connect to the management server (server name). please verify that you have entered the correct host name and the status of the oracle management server"
plz tell me as soon as possible......
i will be thanks for all....
We have a client with our data base, but this database is undergoing constant changes since the development has not been finished, for that reason whenever we made an update we must synchronize the data base. I wondering if exists a tool in which setup can be created and updates the data base in SQL.
View 1 Replies View RelatedHello.
I want to transfer (Export or Import) my Database TEST1 to TEST2.
To do so I execute the following steps :
- Create an empty Database TEST2
- Create A login TEST2USR which will be the owner of the objests in TEST2
But the owner of the User Objects in TEST1 is TEST1USR
How can i transfer my objects using (Import/Export Utility) from TEST1 to TEST2 changing the owner (From TEST1USR to TEST2USR).
hi
i want copy Data base fron 2 sql server2000 in the same network. so i want copy all object(table,users,diagrams,....)
hi i want to save evrey mounth the data base files. so i will use DTS to detch base ?
then if i detch it i can cotinu using it ?
thanks
Hello, everyone:
In the BOL about Designing a Backup and Restore Strategy, it is mentioned there is a Base Functionality Script that should be run after SQL Server restored. What is Base Functionality Script? Just DBCC CHECKDB? Anything else?
Thanks
ZYT
So which is the biggest database you have worked with ?
View 8 Replies View RelatedI am currently looking to buy or build software that enables my firm to:
Run a set of scripts to create a base database - empty database with minimum amounts of data (i.e. lookup data and seed data). So that when a new development project begins all that is needed to build the database is to run these scripts.
The challenges we face is managing these scripts. It would be easier from a manual perspective to only have 5-6 scripts, so that we do not need to manually open and execute each script (representing an object). The problem with this is when you modify a stored procedure, you modify it in your version control platform (which is single object based) and then you need to find and replace the object in your script.
What we are looking to do is buy or build an application to manage these files for us. I was wondering if anyone has purchased a solution to accomodate this?
We currently have ApexSQL Diff - which works well to compare contents of databases (structurally it does well, seems to have a problem comparing data but that is another discussion). What it does not do well is script out an entire database, and if it were to do this, it would put it all in one file.
Hey all,
I am spinning my wheels to get this thing resolved unable to do that. How can i convert this code into set based or without cursors code.
declare cursor2 cursor for
select File_Name, File_Title_Txt, Upd_Mtch_tx, UpdateInd, AddInd, DeleteInd, AnyUpdateInd from File_Object_Table
where TableName = ''' + @Table + '''
and Criteria = ''' + @Criteria + '''
and File_Title_Txt = ''' + @Title + '''
declare @File_Name varchar(50)
declare @File_Var1 varchar(50)
declare @File_Var2 varchar(500)
declare @File_Var3 bit
declare @File_Var4 bit
declare @File_Var5e bit
declare @File_Var6 bit
open cursor2
fetch next from cursor2 into @File_Name, @File_Var1, @ExtraUpdateMatch, @PullUpdate, @File_Var4, @File_Var5e, @File_Var6
WHILE (@@fetch_status = 0)
begin
if @File_Var6 = 1
begin
exec (''INSERT ConfirmTable SELECT ''''' + @fileId + ''''', A.UnitNbr, ''''' + @Title + ''''', '' + @File_Var1 + '', A.'' + @File_Name + '', B.'' + @File_Name + '', ''''U''''
from #tempTable A left join #tempTable B on B.UnitNbr = A.UnitNbr and B.ActivityStatusCd = ''''U'''' '' + @File_Var2+ ''
where A.ActivityStatusCd = ''''O'''' and B.ActivityStatusCd = ''''U'''''')
end
fetch next from mtcursor2 into @File_Name, @File_Var1, @File_Var2, @File_Var3, @File_Var4, @File_Var5e, @File_Var6
end
close cursor2
deallocate cursor2
Sebastian Garibaldi writes "Hi I'm Sebastian from Argentina, and i have a problem with a SQL data base. I receive error from data base of broken index and consistency errors. I set the fill factor with the information from the books online, i put 70 in tables that have a lot of INSERT/UPDATE/DELETE but it works for two o tree days.
I now that i must make some maintain in the database but which tools i shuld use?
here i paste an error from dbcc checktable:
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 981108969. The text, ntext, or image node at page (1:949979), slot 52, text ID 57535781339136 is not referenced.
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 981108969. The text, ntext, or image node at page (1:949979), slot 53, text ID 57535782191104 is not referenced.
DBCC results for 'FCRMVI'.
There are 108460 rows in 17430 pages for object 'FCRMVI'.
CHECKTABLE found 0 allocation errors and 2 consistency errors in table 'FCRMVI' (object ID 981108969).
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKTABLE (ArleiProd.dbo.FCRMVI ).
thanks, and sorry my english."
Vipin writes "Hello
Can it be possible that triggers can be fired to affect tables lying in different database.
Database may be on same Machine or may be on different machine.
Explain with Example"
Hi
SQL Server 2000
Table_A, Col_1 datetime
I want a query to group the date on weeks.
Please advise how ?
Thanks
Jawad
Hi,I am looking to check and set the encoding of the database using sqlcommands that work both for SQL-Server and JET.something equivalent to the postgreSQL commands:'SHOW server_encoding'Thanks in advance,Maarten
View 1 Replies View RelatedI need to create a report containing the headcounts of the employees for each month. The data I can retrieve from the database looks like this:
Name
StartEmp
EndEmp
tom
1/jan/05
15/mrt/05
dirk
1/jan/05
31/mrt/06
jan
1/feb/05
NULL
In order to get the right information for the report the information should be represented in the following way:
January 2005
February 2005
March 2005
"April" 2005
Tom
1
1
0,5
1
Dirk
1
1
1
1
Jan
0
1
1
1
HeadCount
2
3
2,5
3
(there should be more data in the 2nd table but it's a sliced representation of the data. Sliced by 2 report parameters: startdate (=1 January 2005) and enddate (=30 April 2005) )
I need some help about building up the query to aggregate the info from table1 to the format of table2.
Hi,
I am relatively new to SQL 2005.
How do I create the Data Base diagrams of my existing data base in SQL 2005 ?
Thanks,
Abhijit Sinha