Slide Shows
Jul 19, 2004I wanted to store images in SQL server and using vb.net I wanted to get the dataset from database display the show on web pages with movenext and move forward. Can someone help me how to do this show.
View 3 RepliesI wanted to store images in SQL server and using vb.net I wanted to get the dataset from database display the show on web pages with movenext and move forward. Can someone help me how to do this show.
View 3 RepliesI have a SQL Agent job that runs at 4:15 in the morning. The job has 5 steps, each step only runs if the preceding step succeeds. The second step, which calls an SSIS package that does the main processing, appears to finish as it goes on to the next step; however, when looking in 'View History' there are 2 entries for this step - the first one shows it as still running (Circled Green Arrow) but with a start and end time. The second entry says the job succeeded.
I have been seeing conflicts, such as deadlocks, with later jobs. I suspect this job is causing the conflicts - maybe the package is still running in the background instead of having actually completed?
what conditions a job step my be showing in the job history as both running AND completed successfully?
Hello,
I have a typical problem in SQL Server 6.5.
We installed a database on Dell6100. Created a database of 300 MB device and 200 Mb of Log device.
After doing Data insertion and deletion operation on the database. It gave sys log full error.
When i check the Device size and Log size availabe both were showing 0.00 MB. But the actual data inserted was less than 2 MB. Then i did a Dump transaction with Truncate_Only and with No_Log also but the output is same.
Then i Ran the DBCC SQLPERF(LOGSPACE)...the output is
Database Name Log Size (MB) Log Space Used (%) Status
-------------------------------------------------------
DB1 200.0 100.0 8
Which means 100 % of Log space is used.
This result is same after restart of the SQl Server.
Can any body help me regarding this
ThanX
__Vijay VM
Hi,
I created one blank ADP to connect default tempdb database on MSDE on server ASHFAQUEPC (name of my msde server). Tested the connection was successful.
I created a table called Testtable from command prompt (MSSQL/Binn) in default tempdb of MSDE using following lines:
…Binn>osql/U sa mypassword
1> use tempdb
1> go
1> Create table Testtable (Cnum integer NOT NULL PRIMARY KEY, City Varchar(15))
1> go
Table Created successfully then I added 2-3 records using following lines;
1> INSERT INTO testable (cnum, city)
1> values (1, ‘abc’)
1> go
1 Record affected and I did same to add 2-3 more records. Then I used following lines to see all the records I entered.
1> select * from testable
1> go
And a list of records displayed at command prompt. After exit from command prompt I found a ‘Testtable’ appeared in the above ADP.
But next day when I opened my pc and opened ADP, I did not found the Testtable even though I re-connected to tempdb on MSDE from File menu. I reached then to command prompt to see whether the table itself is existing. Strange it was not there.
Can somebody tell me how can I get connected to testable automatically when I open my ADP? Where might have gone wrong? Do I need to create table again and input records?
I want to make sure before I do anything with my real dbs.
Any help would be highly appreciated.
With kind regards,
Ashfaque :confused:
I had 3 questions regarding system SPs in SQLServer2008:
1. Does "stored procedures are documented in SQL Server Books Online" in System Stored Procedures (Transact-SQL) have a special meaning or it means that these system SPs have documentation while the others don't?
2. Why the system SPs listed in MSDN are less than the actual ones in SQLServer2008?
3. Is there a list that shows which system SPs are most used?
If iConn.State = ConnectionState.Open Then iConn.Close()
iConn.Open()
Dim rsBills As New Data.DataSet
rsBills = New DataSet
Dim daBills As New SqlDataAdapter
daBills = New SqlDataAdapter
rsBills.Clear()
Dim cmBills As New SqlCommand
cmBills = iConn.CreateCommand
cmBills.CommandText = "Select OR_no, Billing_mo From dbo.vwBilling Where Month(dbo.vwBilling.Billing_mo)= " & Month(Me.dtto.Value) & " And Year(dbo.vwBilling.Billing_mo) = " & Year(Me.dtto.Value) & " ORDER BY OR_no "
daBills.SelectCommand = cmBills
rsBills.AcceptChanges()
rsBills.Clear()
daBills.Fill(rsBills, "Bills")
Me.DataGridView1.DataSource = Nothing
Me.DataGridView1.DataSource = rsBills.Tables("Bills")
that is my code when this procedure called it shows the real data or records that inserted but when i run my view in server explorer the records that inserted is missing
here is my code in views
SELECT OR_no, Billing_mo, Account_no, Name, Address, Cno, Pres_read, Mprev_read, Sub_read, Pres2, Prev2, SRead2, Mtr_cons, Amount, NPC, Dmem,
Cmem, Tot_bill, D_Pmnt, Class, Newbill, Prd_fr, Prd_to, Type_Pmnt, Type_Date, Type_Docs, wtax
FROM dbo.Billing
same in my base table it seems that no records was inserted when i show the result table, hope you can help me snSQL
RS + SP2
View 5 Replies View RelatedI am not so familiar with SQL Server 2005, but the problem is that when i created a vies and try to save it, instead of the name starting with the dbo. prefix, its starting with my username.
And i just found out that this is not happening only in the view its happening where ever i created an object and try to save it.
How can i change this from my username to make it display dbo. instead.
I think this is why i'm getting permission error when i try to use DTS package.
I have the following code in Script task. However, tablesInFile.Rows is sorted by name in ASCII order. Anyway to get the "natural" order of Excel workbook? Or just the first tab?
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & excelFileName & _
";Extended Properties=Excel 8.0"
excelConnection = New OleDbConnection(connectionString)
excelConnection.Open()
'tablesInFile = excelConnection.GetSchema("Tables")
tablesInFile = excelConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE_NAME"}) ' .GetSchema("Tables")
tableCount = tablesInFile.Rows.Count
For Each tableInFile In tablesInFile.Rows
hello all... I have a sql2005express database that I am trying to use a sqldatasource control on. I drop the control on to the page and click the configure data source link. I choose a db connection that I have setup previously. on the next step where you are supposed to select the table or view you want to use I only see views, no tables.
I can use the SQL statement option to get data from the table. and I can drag the table from the database explorer window onto the design surface, which will create all of the sql statements (select, insert,update,delete)
I am using a specific userid to access data but I do not really have any special permissions setup
any help or suggestions would be appreciated. Thanks
This is my syntax which looks valid to me, but the message will never send, need to get the message to send? (@recipients & @from_address are junk here, but valid email addresses in my procedure)
Code:
exec msdb.dbo.sp_send_dbmail
@profile_name = 'DatabaseMail',
@recipients = 'loggedinuser@domain.com',
@body_format = 'HTML',
@from_address = 'SQLEmailAccount@domain.com',
@body = 'Test 12345',
@subject = 'Test Email From SQL Server';
Hi
I'm using an SQL server database to run a website with ASP.
A new page I'm making will only display the contents on fields containing numeric data and it won't display text.
Other pages work fine. Does anyone have any ideas as to why this is happening - I've never seen in before.
Dave
http://pink-football.com/gossip.asp
When I probe sys.dm_exec_sessions (joining with other DMVs to get active-session info) I get the login_name column to be blank for a certain session.
Yet, for the same spid, the Login shows up properly (not blank) when I execute "sp_who2 active".
It also shows up properly in sys.sysprocesses.
What could be the reason for the faulty output of sys.dm_exec_sessions ?
The last page of the report has a table or rectangle (tried both) which is supposed to be invisible based on a parameter. However, the page still shows up with only the header! Apparently the report knows that the next element (table or rectangle) has to be on a new page, and only too late figures out that the element is invisible.
Anybody else encountered this, or has a solution?
Thanks
We just installed the service pack 2 to our server, so I did a select @@version but it's still say Service Pack 1, even though the version number is now 3054. Is that a bug in the service pack?
Thanks.
Hi
I am showing graph in my report as Column Chart .When my graph have more values it shows all values as crowded and look messy.
Is there is any way to restrict values on X axis up to limited number.
so that graph will be seen clearly.
Regards
Pankaj
I can view my reports fine when I go to the preview window, however, when I choose the option to see the 'Print Layout', everything comes up black. The only thing I can see iss my header image.
Does anyone know what could be causing this?
Thanks
Hello!
I'm working with the SQL Server 2005 Developer Edition. When i created a mining structure for association rules and go into the rule by drillthrough there's something i don't understand.
In the SQL Server the data set is:
ID: MM: MF:
47 463 200
And drillthrough shows me:
ID: MM: MF:
47 476 227
Why is the result of drillthrough another than in the table of the SQL Server???
Database shows in read only mode when I did try to restore my database.But How to can I convert it to online mode?
pls help
This is so simple, but I can't get it to work. I created a grouping on the name field so that all entries for a particular person are on their own page. I break out perfectly so each one is a page for where I should get rows for that one person I only get one. On no page do I see more than one row. The data is not being summarized so that does not explain it.
Why would I lose data row? Thanks!
Hi there,I am not sure how many of you have experienced this problem before but here is how to replicate it: Add a GridView, SqlDataSource and Button to a new projectSet the DataSourceID to the SqlDataSource objectSet AllowPaging to True on the GridViewWithin the Button1_Click sub, change the SqlDataSource.SelectCommand to a new Query e.g SELECT * FROM table WHERE ID > 1Run the project Click on another page, i.e. "3" on the GridView SqlDataSource.SelectCommand is now blank(!), thus Gridview displays nothing. Has anyone else found a solution to this annoying issue? Any help is appreciated.Regards
View 5 Replies View RelatedI have a table which has a blank as owner name when I see on Enterprise manager. Sp_changeobjectowner is not working on this to change the owner name to dbo.I am still able to create another table with same name under dbo.But I want to get rid of the table which has no ownername. When i run the drop table command it doesn't drop that!!It says invalid object!!Any help!!
thanks,
Di.
I have got SQLv6.5 SP5a with SMS1.2 SP4 on seperate Alpha boxes. I have automated the backups so they are scheduled for after hours. SMS gets backed up first and TEMPDB shortly afterwards. However, since a back log in SMS MIFS has happened, the TEMPDB backup displays of 100,000pages backed up. When you back it up on its own, it only shows 170+ pages.
The SMS DB is 600MB in size, the Log is 210MB, Open objects is 5000, and TEMPDB is set 210MB on its own device.
Any ideas
Hi All,
When i run sp_spaceused on one of my database, PROD, it gives the following output
database_name: PROD
database_size: 4268.00 MB
unallocated space: -789.82 MB
reserved: 4654920 KB
data: 2929008 KB
index_size: 327272 KB
unused: 1398640 KB
Why is that the unallocated space is negative ?
On the drive where the datafiles resides there is enough free space . Also, the datafile and transaction are set to auto grow with unlimited file growth
FYI - the OS is Windows 2000 and the DB is SQL Server 2000 with SP3
Appreciate your time and help on this.
How could I create a table that shows the month, each day in that month and the year and give me the option to set a start date & and end date? This is sql server 2005. I have used this before, but it doesn't allow me to see the days in the month. Essentially I want my output to be
Day Month Year
01-01-2012 January 2012
.......
01-02-2015 January 2015
.....
03-01-2015 March 2015
....
08-02-2020 August 2020
Code:
CREATE TABLE #yourTempTable([MonthName] VARCHAR(9), [Year] INT);
WITH CTE(N) AS (SELECT 1 FROM (SELECT 1 UNION ALL SELECT 1)a(N)),
CTE2(N) AS (SELECT 1 FROM CTE x CROSS JOIN CTE y),
CTE3(N) AS (SELECT 1 FROM CTE2 x CROSS JOIN CTE2 y),
TALLY(N) AS (SELECT 0 UNION ALL
SELECT TOP 11 ROW_NUMBER() OVER(ORDER BY (SELECT NULL))
FROM CTE3),
DATETALLY(N) AS (SELECT DATEADD(month, DATEDIFF(month, 0, GETDATE())+N, 0)
FROM TALLY)
INSERT INTO #yourTempTable
SELECT DATENAME(month,N), YEAR(N)
FROM DATETALLY;
SELECT *
FROM #yourTempTable;
INSERT WITH SELECT HAS THIS:
,Convert(Int,TARG_SALES) AS TARG_SALES
Treats the column as if it were formatted decimal !!
*Groan* Sorry. One more.
ERD above is what my database looks like (ignore it's in Access, database is in SQL 2005)
I have this code:
SELECT orderID, orderAmount = SUM(customerID)/customerID FROM orders
GROUP BY orderID
-- When Sum of the customer ID (and then) divided by the customer ID > 1
HAVING orderAmount > 1
which doesn't work because I never did find out how you make a column in the results to output your maths in.
orderAmount doesn't exist as a column in the database, but for this query it should show only those customers who have ordered more than once with the company.
Thanks again for any replies.
Hello,I am trying to create a view that shows the followingField1: Sum of Amounts from Table AField2: Count of Amounts from Table AField3: Sum of of Amounts from Table BField4: Count of Amounts from Table B......Field3: Sum of of Amounts from Table HField4: Count of Amounts from Table H......Things are a bit more complex but this is the gist.I am using SQL 2000.I know how to do this pretty easily using a stored procedure. But howcan I do it in a view? A SQL server won't meet my needs in thissituation.I tried OpenQuery ('myserver', 'exec myprocedure') but get the messagethat my server is not configured for data access. I tried the systemstored procedure to set data access to true but nothing seemed tohappen.I also tried Select * from (Select Statement1, select statement2)but got syntax error at the comma between statement1 and statement2.Trying to use select Statement1 as ABC to does not seem to work either.Is there a way to do what I want without making 15 views and then afinal view that shows them all together? I know I could probably dosomething by creating a ton of functions, but it really seems thisshould not be that hard...I am definitely open to any easy suggestions!Thanks,Ryan
View 3 Replies View RelatedMy co-worker, no idiot, says that the tooltip in the system tray forthe SS2000 icon usually shows the computer and server, but once in awhile shows the password (two slashes and the password).Is this a known bug of some sort? It really shouldn't be showing hispassword. It's likely the developer edition, but still, that isn'tgood.
View 2 Replies View Relatedi had scheduled to run a package it failed but a part of the package still shows up on the integration system running packages. i tried to stop it or delete it nothing works. when i try toi run the package even in visual studio that part of the package fails.
how do i remove the running package???
Thanks
jas
I have created a report with a stored proc which takes a parameter whose default value is null. Now when I run my stored proc in Enterprise Manager without any params I get 4 rows otherwise with proper parameter I get 2 rows.
Now I set the params value to allow for Null and blank values. When I run the report if I provide parameter value it works fine but if i try to run it without any param it shows an empty report while the stored proc running without params shows 4 rows.
I have earlier sucessfully created reports where stored procs had 4 params out of which 3 where defaulted to null. And so I set the allow nulls, Allow Blanks values to be true for those params in Rep services. So when I selected value for 1st param and ran the report I got the desired report. But this time I have only one param which can be null. But its not working.
Thanks in advance.
I've got a drill-down report in a table. There's a group set to hidden = false, and a textbox set as its toggle. When I view the report, the data in the group displays properly (it's not hidden), but the toggle icon is a "+", when it should be a "-". When I click the toggle, the group is hidden and the toggle icon changes to a "-".
I'm left clicking "+" to get less information and "-" to get more information, it's all backwards!
Has this bug been fixed? Is there a work-around?
Hi all. My name is Guilherme and I'm a Braziliam software developer.
I've installed on my computer all the software required to work with MS SQL RS. I log on this computer using my domain user. and a few days ago i needed to change my password (network policy)
Now, when I open the adress http://localhost/reports on my computer, I can't see the installed reports, neither the configuration page.
What should I do?
Thanks in advance.