Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Friday, February 17, 2012

Default Trace SQL 2005

What settings are there for the default trace option in SQL 2005? I see that
it stores a history of traces in the \MSSQL.1\MSSQL\LOG. It is pretty cool
because it will show you in SSMS a SQL report with schema changes on a per
database level.
I just want to know how to modify the setings for the default trace option as
far as size, time, and rollover.The only setting that exists is to turn it off (using sp_configure). IF you want something different
from the default, you have to roll your own (using server-side traces). Being able to customize
these things is interesting, so you might want to suggest this for next version
(http://connect.microsoft.com/sqlserver).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"evan4434" <u36821@.uwe> wrote in message news:7709e496ca18a@.uwe...
> What settings are there for the default trace option in SQL 2005? I see that
> it stores a history of traces in the \MSSQL.1\MSSQL\LOG. It is pretty cool
> because it will show you in SSMS a SQL report with schema changes on a per
> database level.
> I just want to know how to modify the setings for the default trace option as
> far as size, time, and rollover.
>

default tables

hi all
is there any one who can tell the basic idea behind inserted, deleted mssql table. how these r affected on dml operations.
i m new to mssql.
thanksInserted and deleted are two special tables used in the trigger statements.

The deleted table stores copies of the affected rows during DELETE and UPDATE statements. During the execution of a DELETE or UPDATE statement, rows are deleted from the trigger table and transferred to the deleted table. The deleted table and the trigger table ordinarily have no rows in common.

The inserted table stores copies of the affected rows during INSERT and UPDATE statements. During an insert or update transaction, new rows are added simultaneously to both the inserted table and the trigger table. The rows in the inserted table are copies of the new rows in the trigger table.

Check BOL for more information.

Harshal.

Tuesday, February 14, 2012

default save location

How can i change the default folder to which my database files are saved? right now it's saving everything to

\program files\mssql server\mssql.1\mssql\data

uggg! i can't even find an option to use a "save as" or export the mdf file. the "save as" tries to save the solution file. Any help is greatly appreciated.

Using SSMS, right-click on the server in Object Explorer, select [Properties], then click on the [Database Settings] tab.

Change the Default Database location in the setting pane.

|||If you want to change the location of the already existing database file, you should consider using the detach / attach functionality which is described in the BOL. Be aware that during this process, the database (not the instance per se) will NOT be available for incoming connections.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Default Record IDs

There has to be somehow the SQL server uniquely identify each record in a db.

I am developing a web app to interface with an MsSQL Server. But in order to delete and update records I need to uniquely identify each record. I know you can do this with int IDENTITY columns, but not every DB table has a int IDENTITY column, so, what I am asking is, is there anyplace where I can query to find out an ID or something of the sort for a record in a db.

ThanksNo, records have no inherant or permanent ID in SQL server unless the database designer specifies one, either through a surrogate key or a natural unique key.

For example, a table with no primary key is called a "heap", and new SQL developers frequently make the mistake of assuming that the data in a heap is in a reliable, predicatable, and fixed order. It is not. While data is appended to a heap in the order it is inserted, the order can be shuffled over time by updates to the table, which cause rewrites to portions and thus change their location.

A well designed database will have a unique way of identifying each record. If the database you are working with does not have one, then you will need to add either an autoincrement field or a GUID field to each table. Autoincrements are integers and thus take up less space and sort/search very quickly. GUIDs have the advantage of being unique not just within a table, but across the entire database and even between databases.

blindman|||If your table has no primary key,unique constraint... then your entire table could have identical records. So unless your table was created with the proper constraints, you have no way of knowing. As already mentioned, if no unique identifier exists you can create one - but you still have to decide which data is valid and which you can delete - but in your case if you have identical information how are you distinguishing now ?

default port of MSDE

I know default port of MSSQL is 1433, but how about MSDE? How to change the
port no (if any)?
Million Thanks
Hi,
The default port for MSDE is 1433. You could change the port number by
running "svrnetcn.exe"
Thanks
Hari
MCDBA
"Grey" <erickwyum@.i-cable.com> wrote in message
news:#taJDibhEHA.216@.tk2msftngp13.phx.gbl...
> I know default port of MSSQL is 1433, but how about MSDE? How to change
the
> port no (if any)?
> Million Thanks
>
|||I thought that it picked whatever port number wasn't in use whenever it
started up? Or is that only for named instances? I don't think mine is ever
configured to use 1433 by itself.
"Hari Prasad" wrote:

> Hi,
> The default port for MSDE is 1433. You could change the port number by
> running "svrnetcn.exe"
> Thanks
> Hari
> MCDBA
>
>
> "Grey" <erickwyum@.i-cable.com> wrote in message
> news:#taJDibhEHA.216@.tk2msftngp13.phx.gbl...
> the
>
>
|||Andrew,
MSDE uses port 1433 by default. This can be changed by server network
utility to use any port that you want on startup. Named instances TCP port
is dynamic. You can see what port it used by looking in the SQL Server
Error log of that particular instance when Instance is running.
-Tom
Please reply only to the newsgroup so that others can benefit. When posting,
please state the version of SQL Server being used and the error number/exact
error message text received, if any.
This posting is provided "AS IS" with no warranties, and confers no rights.